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" |
|
13 #include "strings_type.h" |
11 |
14 |
12 /* main_gui.cpp */ |
15 /* main_gui.cpp */ |
13 void SetupColorsAndInitialWindow(); |
|
14 void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2); |
16 void CcPlaySound10(bool success, TileIndex tile, uint32 p1, uint32 p2); |
15 void CcBuildCanal(bool success, TileIndex tile, uint32 p1, uint32 p2); |
17 void CcBuildCanal(bool success, TileIndex tile, uint32 p1, uint32 p2); |
16 void CcTerraform(bool success, TileIndex tile, uint32 p1, uint32 p2); |
|
17 |
18 |
18 /* settings_gui.cpp */ |
19 /* settings_gui.cpp */ |
19 void ShowGameOptions(); |
20 void ShowGameOptions(); |
20 void ShowGameDifficulty(); |
21 void ShowGameDifficulty(); |
21 void ShowPatchesSelection(); |
22 void ShowPatchesSelection(); |
34 /* news_gui.cpp */ |
35 /* news_gui.cpp */ |
35 void ShowLastNewsMessage(); |
36 void ShowLastNewsMessage(); |
36 void ShowMessageOptions(); |
37 void ShowMessageOptions(); |
37 void ShowMessageHistory(); |
38 void ShowMessageHistory(); |
38 |
39 |
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 */ |
40 /* train_gui.cpp */ |
45 void ShowOrdersWindow(const Vehicle *v); |
41 void ShowOrdersWindow(const Vehicle *v); |
46 |
|
47 /* road_gui.cpp */ |
|
48 void ShowBuildRoadToolbar(RoadType roadtype); |
|
49 void ShowBuildRoadScenToolbar(); |
|
50 |
42 |
51 /* dock_gui.cpp */ |
43 /* dock_gui.cpp */ |
52 void ShowBuildDocksToolbar(); |
44 void ShowBuildDocksToolbar(); |
53 |
45 |
54 /* aircraft_gui.cpp */ |
46 /* aircraft_gui.cpp */ |
55 void ShowBuildAirToolbar(); |
47 void ShowBuildAirToolbar(); |
56 |
48 |
57 /* terraform_gui.cpp */ |
|
58 void ShowTerraformToolbar(Window *link = NULL); |
|
59 |
|
60 /* tgp_gui.cpp */ |
49 /* tgp_gui.cpp */ |
61 void ShowGenerateLandscape(); |
50 void ShowGenerateLandscape(); |
62 void ShowHeightmapLoad(); |
51 void ShowHeightmapLoad(); |
63 |
|
64 void PlaceProc_DemolishArea(TileIndex tile); |
|
65 void PlaceProc_LevelLand(TileIndex tile); |
|
66 bool GUIPlaceProcDragXY(const WindowEvent *e); |
|
67 |
52 |
68 /** Drag and drop selection process, or, what to do with an area of land when |
53 /** Drag and drop selection process, or, what to do with an area of land when |
69 * you've selected it. */ |
54 * you've selected it. */ |
70 enum { |
55 enum { |
71 DDSP_DEMOLISH_AREA, |
56 DDSP_DEMOLISH_AREA, |
|
57 DDSP_RAISE_AND_LEVEL_AREA, |
|
58 DDSP_LOWER_AND_LEVEL_AREA, |
72 DDSP_LEVEL_AREA, |
59 DDSP_LEVEL_AREA, |
73 DDSP_CREATE_DESERT, |
60 DDSP_CREATE_DESERT, |
74 DDSP_CREATE_ROCKS, |
61 DDSP_CREATE_ROCKS, |
75 DDSP_CREATE_WATER, |
62 DDSP_CREATE_WATER, |
|
63 DDSP_CREATE_RIVER, |
76 DDSP_PLANT_TREES, |
64 DDSP_PLANT_TREES, |
77 DDSP_BUILD_BRIDGE, |
65 DDSP_BUILD_BRIDGE, |
78 |
66 |
79 /* Rail specific actions */ |
67 /* Rail specific actions */ |
80 DDSP_PLACE_RAIL_NE, |
68 DDSP_PLACE_RAIL_NE, |
97 void ShowBuildTreesToolbar(); |
85 void ShowBuildTreesToolbar(); |
98 void ShowBuildTreesScenToolbar(); |
86 void ShowBuildTreesScenToolbar(); |
99 void ShowTownDirectory(); |
87 void ShowTownDirectory(); |
100 void ShowIndustryDirectory(); |
88 void ShowIndustryDirectory(); |
101 void ShowSubsidiesList(); |
89 void ShowSubsidiesList(); |
102 void ShowPlayerStations(PlayerID player); |
|
103 void ShowPlayerFinances(PlayerID player); |
|
104 void ShowPlayerCompany(PlayerID player); |
|
105 |
90 |
106 void ShowEstimatedCostOrIncome(Money cost, int x, int y); |
91 void ShowEstimatedCostOrIncome(Money cost, int x, int y); |
107 void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y); |
92 void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y); |
108 |
|
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 |
93 |
118 void ShowSmallMap(); |
94 void ShowSmallMap(); |
119 void ShowExtraViewPortWindow(); |
95 void ShowExtraViewPortWindow(); |
120 void SetVScrollCount(Window *w, int num); |
96 void SetVScrollCount(Window *w, int num); |
121 void SetVScroll2Count(Window *w, int num); |
97 void SetVScroll2Count(Window *w, int num); |
122 void SetHScrollCount(Window *w, int num); |
98 void SetHScrollCount(Window *w, int num); |
123 |
99 |
124 void ShowCheatWindow(); |
100 void ShowCheatWindow(); |
125 |
101 |
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 |
|
139 void BuildFileList(); |
102 void BuildFileList(); |
140 void SetFiosType(const byte fiostype); |
103 void SetFiosType(const byte fiostype); |
141 |
104 |
142 /* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ |
105 /* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ |
143 extern const TextColour _fios_colors[]; |
106 extern const TextColour _fios_colors[]; |
144 |
107 |
145 /* bridge_gui.cpp */ |
108 /* bridge_gui.cpp */ |
146 void ShowBuildBridgeWindow(uint start, uint end, byte type); |
109 void ShowBuildBridgeWindow(TileIndex start, TileIndex end, byte type); |
147 |
110 |
148 void ShowBuildIndustryWindow(); |
111 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(); |
112 void ShowMusicWindow(); |
152 |
113 |
153 /* main_gui.cpp */ |
114 /* main_gui.cpp */ |
154 void HandleOnEditText(const char *str); |
115 void HandleOnEditText(const char *str); |
155 VARDEF bool _station_show_coverage; |
|
156 VARDEF PlaceProc *_place_proc; |
|
157 |
116 |
158 /* vehicle_gui.cpp */ |
|
159 void InitializeGUI(); |
117 void InitializeGUI(); |
160 |
118 |
161 void ShowPlayerGroup(PlayerID player, VehicleType veh); |
|
162 |
|
163 #endif /* GUI_H */ |
119 #endif /* GUI_H */ |