3 /** @file gui.h */ |
3 /** @file gui.h */ |
4 |
4 |
5 #ifndef GUI_H |
5 #ifndef GUI_H |
6 #define GUI_H |
6 #define GUI_H |
7 |
7 |
8 #include "station.h" |
8 #include "window_type.h" |
9 #include "window.h" |
9 #include "vehicle_type.h" |
10 #include "string.h" |
10 #include "gfx_type.h" |
|
11 #include "economy_type.h" |
|
12 #include "tile_type.h" |
11 |
13 |
12 /* main_gui.cpp */ |
14 /* main_gui.cpp */ |
13 void SetupColorsAndInitialWindow(); |
|
14 void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2); |
15 void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2); |
15 void CcBuildCanal(bool success, TileIndex tile, uint32 p1, uint32 p2); |
16 void CcBuildCanal(bool success, TileIndex tile, uint32 p1, uint32 p2); |
16 void CcTerraform(bool success, TileIndex tile, uint32 p1, uint32 p2); |
|
17 |
17 |
18 /* settings_gui.cpp */ |
18 /* settings_gui.cpp */ |
19 void ShowGameOptions(); |
19 void ShowGameOptions(); |
20 void ShowGameDifficulty(); |
20 void ShowGameDifficulty(); |
21 void ShowPatchesSelection(); |
21 void ShowPatchesSelection(); |
34 /* news_gui.cpp */ |
34 /* news_gui.cpp */ |
35 void ShowLastNewsMessage(); |
35 void ShowLastNewsMessage(); |
36 void ShowMessageOptions(); |
36 void ShowMessageOptions(); |
37 void ShowMessageHistory(); |
37 void ShowMessageHistory(); |
38 |
38 |
39 /* rail_gui.cpp */ |
|
40 void ShowBuildRailToolbar(RailType railtype, int button); |
|
41 void PlaceProc_BuyLand(TileIndex tile); |
|
42 void ReinitGuiAfterToggleElrail(bool disable); |
|
43 |
|
44 /* train_gui.cpp */ |
39 /* train_gui.cpp */ |
45 void ShowOrdersWindow(const Vehicle *v); |
40 void ShowOrdersWindow(const Vehicle *v); |
46 |
|
47 /* road_gui.cpp */ |
|
48 void ShowBuildRoadToolbar(RoadType roadtype); |
|
49 void ShowBuildRoadScenToolbar(); |
|
50 |
41 |
51 /* dock_gui.cpp */ |
42 /* dock_gui.cpp */ |
52 void ShowBuildDocksToolbar(); |
43 void ShowBuildDocksToolbar(); |
53 |
44 |
54 /* aircraft_gui.cpp */ |
45 /* aircraft_gui.cpp */ |
55 void ShowBuildAirToolbar(); |
46 void ShowBuildAirToolbar(); |
56 |
47 |
57 /* terraform_gui.cpp */ |
|
58 void ShowTerraformToolbar(Window *link = NULL); |
|
59 |
|
60 /* tgp_gui.cpp */ |
48 /* tgp_gui.cpp */ |
61 void ShowGenerateLandscape(); |
49 void ShowGenerateLandscape(); |
62 void ShowHeightmapLoad(); |
50 void ShowHeightmapLoad(); |
63 |
|
64 void PlaceProc_DemolishArea(TileIndex tile); |
|
65 void PlaceProc_LevelLand(TileIndex tile); |
|
66 bool GUIPlaceProcDragXY(const WindowEvent *e); |
|
67 |
51 |
68 /** Drag and drop selection process, or, what to do with an area of land when |
52 /** Drag and drop selection process, or, what to do with an area of land when |
69 * you've selected it. */ |
53 * you've selected it. */ |
70 enum { |
54 enum { |
71 DDSP_DEMOLISH_AREA, |
55 DDSP_DEMOLISH_AREA, |
|
56 DDSP_RAISE_AND_LEVEL_AREA, |
|
57 DDSP_LOWER_AND_LEVEL_AREA, |
72 DDSP_LEVEL_AREA, |
58 DDSP_LEVEL_AREA, |
73 DDSP_CREATE_DESERT, |
59 DDSP_CREATE_DESERT, |
74 DDSP_CREATE_ROCKS, |
60 DDSP_CREATE_ROCKS, |
75 DDSP_CREATE_WATER, |
61 DDSP_CREATE_WATER, |
76 DDSP_PLANT_TREES, |
62 DDSP_PLANT_TREES, |
104 void ShowPlayerCompany(PlayerID player); |
90 void ShowPlayerCompany(PlayerID player); |
105 |
91 |
106 void ShowEstimatedCostOrIncome(Money cost, int x, int y); |
92 void ShowEstimatedCostOrIncome(Money cost, int x, int y); |
107 void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y); |
93 void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y); |
108 |
94 |
109 enum StationCoverageType { |
|
110 SCT_PASSENGERS_ONLY, |
|
111 SCT_NON_PASSENGERS_ONLY, |
|
112 SCT_ALL |
|
113 }; |
|
114 |
|
115 void DrawStationCoverageAreaText(int sx, int sy, StationCoverageType sct, int rad); |
|
116 void CheckRedrawStationCoverage(const Window *w); |
|
117 |
|
118 void ShowSmallMap(); |
95 void ShowSmallMap(); |
119 void ShowExtraViewPortWindow(); |
96 void ShowExtraViewPortWindow(); |
120 void SetVScrollCount(Window *w, int num); |
97 void SetVScrollCount(Window *w, int num); |
121 void SetVScroll2Count(Window *w, int num); |
98 void SetVScroll2Count(Window *w, int num); |
122 void SetHScrollCount(Window *w, int num); |
99 void SetHScrollCount(Window *w, int num); |
123 |
100 |
124 void ShowCheatWindow(); |
101 void ShowCheatWindow(); |
125 |
|
126 void DrawEditBox(Window *w, querystr_d *string, int wid); |
|
127 void HandleEditBox(Window *w, querystr_d *string, int wid); |
|
128 int HandleEditBoxKey(Window *w, querystr_d *string, int wid, WindowEvent *we); |
|
129 bool HandleCaret(Textbuf *tb); |
|
130 |
|
131 void DeleteTextBufferAll(Textbuf *tb); |
|
132 bool DeleteTextBufferChar(Textbuf *tb, int delmode); |
|
133 bool InsertTextBufferChar(Textbuf *tb, uint32 key); |
|
134 bool InsertTextBufferClipboard(Textbuf *tb); |
|
135 bool MoveTextBufferPos(Textbuf *tb, int navmode); |
|
136 void InitializeTextBuffer(Textbuf *tb, const char *buf, uint16 maxlength, uint16 maxwidth); |
|
137 void UpdateTextBufferSize(Textbuf *tb); |
|
138 |
102 |
139 void BuildFileList(); |
103 void BuildFileList(); |
140 void SetFiosType(const byte fiostype); |
104 void SetFiosType(const byte fiostype); |
141 |
105 |
142 /* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ |
106 /* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ |
144 |
108 |
145 /* bridge_gui.cpp */ |
109 /* bridge_gui.cpp */ |
146 void ShowBuildBridgeWindow(uint start, uint end, byte type); |
110 void ShowBuildBridgeWindow(uint start, uint end, byte type); |
147 |
111 |
148 void ShowBuildIndustryWindow(); |
112 void ShowBuildIndustryWindow(); |
149 void ShowQueryString(StringID str, StringID caption, uint maxlen, uint maxwidth, Window *parent, CharSetFilter afilter); |
|
150 void ShowQuery(StringID caption, StringID message, Window *w, void (*callback)(Window*, bool)); |
|
151 void ShowMusicWindow(); |
113 void ShowMusicWindow(); |
152 |
114 |
153 /* main_gui.cpp */ |
115 /* main_gui.cpp */ |
154 void HandleOnEditText(const char *str); |
116 void HandleOnEditText(const char *str); |
155 VARDEF bool _station_show_coverage; |
117 VARDEF bool _station_show_coverage; |
156 VARDEF PlaceProc *_place_proc; |
|
157 |
118 |
158 /* vehicle_gui.cpp */ |
|
159 void InitializeGUI(); |
119 void InitializeGUI(); |
160 |
120 |
161 void ShowPlayerGroup(PlayerID player, VehicleType veh); |
|
162 |
|
163 #endif /* GUI_H */ |
121 #endif /* GUI_H */ |