2005-07-24 14:12:37 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
#ifndef GUI_H
|
|
|
|
#define GUI_H
|
|
|
|
|
2005-09-27 18:51:04 +00:00
|
|
|
#include "station.h"
|
2004-09-07 19:34:55 +00:00
|
|
|
#include "window.h"
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
/* main_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void SetupColorsAndInitialWindow(void);
|
2005-06-24 12:38:35 +00:00
|
|
|
void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
|
|
|
void CcBuildCanal(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
|
|
|
void CcTerraform(bool success, TileIndex tile, uint32 p1, uint32 p2);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* settings_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowGameOptions(void);
|
|
|
|
void ShowGameDifficulty(void);
|
|
|
|
void ShowPatchesSelection(void);
|
|
|
|
void ShowNewgrf(void);
|
2006-03-01 20:24:22 +00:00
|
|
|
void DrawArrowButtons(int x, int y, int ctab, byte state, bool enabled);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* graph_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowOperatingProfitGraph(void);
|
|
|
|
void ShowIncomeGraph(void);
|
|
|
|
void ShowDeliveredCargoGraph(void);
|
|
|
|
void ShowPerformanceHistoryGraph(void);
|
|
|
|
void ShowCompanyValueGraph(void);
|
|
|
|
void ShowCargoPaymentRates(void);
|
|
|
|
void ShowCompanyLeagueTable(void);
|
|
|
|
void ShowPerformanceRatingDetail(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* news_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowLastNewsMessage(void);
|
|
|
|
void ShowMessageOptions(void);
|
|
|
|
void ShowMessageHistory(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* traintoolb_gui.c */
|
2005-10-16 09:13:04 +00:00
|
|
|
void ShowBuildRailToolbar(RailType railtype, int button);
|
2005-06-24 12:38:35 +00:00
|
|
|
void PlaceProc_BuyLand(TileIndex tile);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* train_gui.c */
|
2005-09-27 18:51:04 +00:00
|
|
|
void ShowPlayerTrains(PlayerID player, StationID station);
|
2005-10-28 20:04:54 +00:00
|
|
|
void ShowTrainViewWindow(const Vehicle *v);
|
2006-07-26 03:33:12 +00:00
|
|
|
void ShowOrdersWindow(const Vehicle *v);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2006-07-26 03:33:12 +00:00
|
|
|
void ShowRoadVehViewWindow(const Vehicle *v);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* road_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowBuildRoadToolbar(void);
|
|
|
|
void ShowBuildRoadScenToolbar(void);
|
2005-09-27 18:51:04 +00:00
|
|
|
void ShowPlayerRoadVehicles(PlayerID player, StationID station);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* dock_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowBuildDocksToolbar(void);
|
2005-09-27 18:51:04 +00:00
|
|
|
void ShowPlayerShips(PlayerID player, StationID station);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2006-07-26 03:33:12 +00:00
|
|
|
void ShowShipViewWindow(const Vehicle *v);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* aircraft_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowBuildAirToolbar(void);
|
2005-09-27 18:51:04 +00:00
|
|
|
void ShowPlayerAircraft(PlayerID player, StationID station);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* terraform_gui.c */
|
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
- Fix: 'L' no longer opens ingame terraform bar in scenario editor bar, but the land generator one
- Feature: [ 1095110 ] Create Lake and draggable Create Desert tools (initial implementation GoneWacko), also added sticky buttons to land generator and town generator
- CodeChange: moved around some of the draggable tools, demystifying them
- CodeChange: change CmdBuildCanal to allow for XANDY dragging not only X or Y (only scenario editor)
- CodeChange: add some more enums to sprites.
- TODO: merge most of the ingame and scenario editor land terraform code. This can only be done after OnClickButton function is changed so it also includes the backreference to the widget being clicked, postponed to after 0.4.0
2005-04-02 23:05:09 +00:00
|
|
|
void ShowTerraformToolbar(void);
|
|
|
|
|
2005-06-24 12:38:35 +00:00
|
|
|
void PlaceProc_DemolishArea(TileIndex tile);
|
|
|
|
void PlaceProc_LevelLand(TileIndex tile);
|
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
- Fix: 'L' no longer opens ingame terraform bar in scenario editor bar, but the land generator one
- Feature: [ 1095110 ] Create Lake and draggable Create Desert tools (initial implementation GoneWacko), also added sticky buttons to land generator and town generator
- CodeChange: moved around some of the draggable tools, demystifying them
- CodeChange: change CmdBuildCanal to allow for XANDY dragging not only X or Y (only scenario editor)
- CodeChange: add some more enums to sprites.
- TODO: merge most of the ingame and scenario editor land terraform code. This can only be done after OnClickButton function is changed so it also includes the backreference to the widget being clicked, postponed to after 0.4.0
2005-04-02 23:05:09 +00:00
|
|
|
bool GUIPlaceProcDragXY(const WindowEvent *we);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
- Fix: 'L' no longer opens ingame terraform bar in scenario editor bar, but the land generator one
- Feature: [ 1095110 ] Create Lake and draggable Create Desert tools (initial implementation GoneWacko), also added sticky buttons to land generator and town generator
- CodeChange: moved around some of the draggable tools, demystifying them
- CodeChange: change CmdBuildCanal to allow for XANDY dragging not only X or Y (only scenario editor)
- CodeChange: add some more enums to sprites.
- TODO: merge most of the ingame and scenario editor land terraform code. This can only be done after OnClickButton function is changed so it also includes the backreference to the widget being clicked, postponed to after 0.4.0
2005-04-02 23:05:09 +00:00
|
|
|
enum { // max 32 - 4 = 28 types
|
|
|
|
GUI_PlaceProc_DemolishArea = 0 << 4,
|
|
|
|
GUI_PlaceProc_LevelArea = 1 << 4,
|
|
|
|
GUI_PlaceProc_DesertArea = 2 << 4,
|
|
|
|
GUI_PlaceProc_WaterArea = 3 << 4,
|
2005-11-07 16:19:45 +00:00
|
|
|
GUI_PlaceProc_ConvertRailArea = 4 << 4,
|
|
|
|
GUI_PlaceProc_RockyArea = 5 << 4,
|
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
- Fix: 'L' no longer opens ingame terraform bar in scenario editor bar, but the land generator one
- Feature: [ 1095110 ] Create Lake and draggable Create Desert tools (initial implementation GoneWacko), also added sticky buttons to land generator and town generator
- CodeChange: moved around some of the draggable tools, demystifying them
- CodeChange: change CmdBuildCanal to allow for XANDY dragging not only X or Y (only scenario editor)
- CodeChange: add some more enums to sprites.
- TODO: merge most of the ingame and scenario editor land terraform code. This can only be done after OnClickButton function is changed so it also includes the backreference to the widget being clicked, postponed to after 0.4.0
2005-04-02 23:05:09 +00:00
|
|
|
};
|
2005-02-22 14:52:20 +00:00
|
|
|
|
(svn r2136) - Fix: [ 1174313 ] terrain hotkeys nonfunctional in scenario editor (D,Q,W,E,R,T,Y,U fltr)
- Fix: 'L' no longer opens ingame terraform bar in scenario editor bar, but the land generator one
- Feature: [ 1095110 ] Create Lake and draggable Create Desert tools (initial implementation GoneWacko), also added sticky buttons to land generator and town generator
- CodeChange: moved around some of the draggable tools, demystifying them
- CodeChange: change CmdBuildCanal to allow for XANDY dragging not only X or Y (only scenario editor)
- CodeChange: add some more enums to sprites.
- TODO: merge most of the ingame and scenario editor land terraform code. This can only be done after OnClickButton function is changed so it also includes the backreference to the widget being clicked, postponed to after 0.4.0
2005-04-02 23:05:09 +00:00
|
|
|
/* misc_gui.c */
|
2005-01-22 20:23:18 +00:00
|
|
|
void PlaceLandBlockInfo(void);
|
|
|
|
void ShowAboutWindow(void);
|
|
|
|
void ShowBuildTreesToolbar(void);
|
|
|
|
void ShowBuildTreesScenToolbar(void);
|
|
|
|
void ShowTownDirectory(void);
|
|
|
|
void ShowIndustryDirectory(void);
|
|
|
|
void ShowSubsidiesList(void);
|
2005-09-30 20:37:25 +00:00
|
|
|
void ShowPlayerStations(PlayerID player);
|
|
|
|
void ShowPlayerFinances(PlayerID player);
|
|
|
|
void ShowPlayerCompany(PlayerID player);
|
2005-03-26 21:22:29 +00:00
|
|
|
void ShowSignList(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
void ShowEstimatedCostOrIncome(int32 cost, int x, int y);
|
|
|
|
void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y);
|
|
|
|
|
2004-12-08 15:46:13 +00:00
|
|
|
void DrawStationCoverageAreaText(int sx, int sy, uint mask,int rad);
|
2006-07-26 03:33:12 +00:00
|
|
|
void CheckRedrawStationCoverage(const Window *w);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowSmallMap(void);
|
|
|
|
void ShowExtraViewPortWindow(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
void SetVScrollCount(Window *w, int num);
|
2005-01-02 17:23:04 +00:00
|
|
|
void SetVScroll2Count(Window *w, int num);
|
2004-08-09 17:04:08 +00:00
|
|
|
void SetHScrollCount(Window *w, int num);
|
|
|
|
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowCheatWindow(void);
|
|
|
|
void AskForNewGameToStart(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2006-01-26 16:19:24 +00:00
|
|
|
void DrawEditBox(Window *w, querystr_d *string, int wid);
|
|
|
|
void HandleEditBox(Window *w, querystr_d *string, int wid);
|
|
|
|
int HandleEditBoxKey(Window *w, querystr_d *string, int wid, WindowEvent *we);
|
2005-02-21 18:59:54 +00:00
|
|
|
bool HandleCaret(Textbuf *tb);
|
|
|
|
|
2005-05-30 16:03:21 +00:00
|
|
|
void DeleteTextBufferAll(Textbuf *tb);
|
2005-02-21 18:59:54 +00:00
|
|
|
bool DeleteTextBufferChar(Textbuf *tb, int delmode);
|
|
|
|
bool InsertTextBufferChar(Textbuf *tb, byte key);
|
|
|
|
bool InsertTextBufferClipboard(Textbuf *tb);
|
|
|
|
bool MoveTextBufferPos(Textbuf *tb, int navmode);
|
|
|
|
void UpdateTextBufferSize(Textbuf *tb);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
2005-01-22 20:23:18 +00:00
|
|
|
void BuildFileList(void);
|
2004-12-04 17:54:56 +00:00
|
|
|
void SetFiosType(const byte fiostype);
|
|
|
|
|
|
|
|
/* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */
|
2005-08-01 16:31:19 +00:00
|
|
|
extern const byte _fios_colors[];
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* network gui */
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowNetworkGameWindow(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* bridge_gui.c */
|
|
|
|
void ShowBuildBridgeWindow(uint start, uint end, byte type);
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ZOOM_IN = 0,
|
|
|
|
ZOOM_OUT = 1,
|
|
|
|
ZOOM_NONE = 2, // hack, used to update the button status
|
|
|
|
};
|
|
|
|
|
2006-07-26 03:33:12 +00:00
|
|
|
bool DoZoomInOutWindow(int how, Window *w);
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowBuildIndustryWindow(void);
|
2005-02-19 14:40:32 +00:00
|
|
|
void ShowQueryString(StringID str, StringID caption, uint maxlen, uint maxwidth, WindowClass window_class, WindowNumber window_number);
|
2005-01-22 20:23:18 +00:00
|
|
|
void ShowMusicWindow(void);
|
2004-08-09 17:04:08 +00:00
|
|
|
|
|
|
|
/* main_gui.c */
|
|
|
|
VARDEF byte _station_show_coverage;
|
|
|
|
VARDEF PlaceProc *_place_proc;
|
|
|
|
|
2005-01-31 11:03:23 +00:00
|
|
|
/* vehicle_gui.c */
|
|
|
|
void InitializeGUI(void);
|
|
|
|
|
2004-08-09 17:04:08 +00:00
|
|
|
#endif /* GUI_H */
|