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" |
|
9 #include "window_gui.h" |
|
10 #include "string.h" |
8 #include "string.h" |
|
9 #include "window_type.h" |
|
10 #include "rail_type.h" |
|
11 #include "road_type.h" |
|
12 #include "vehicle.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 void CcTerraform(bool success, TileIndex tile, uint32 p1, uint32 p2); |
17 |
18 |
18 /* settings_gui.cpp */ |
19 /* settings_gui.cpp */ |
104 void ShowPlayerCompany(PlayerID player); |
105 void ShowPlayerCompany(PlayerID player); |
105 |
106 |
106 void ShowEstimatedCostOrIncome(Money cost, int x, int y); |
107 void ShowEstimatedCostOrIncome(Money cost, int x, int y); |
107 void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y); |
108 void ShowErrorMessage(StringID msg_1, StringID msg_2, int x, int y); |
108 |
109 |
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(); |
110 void ShowSmallMap(); |
119 void ShowExtraViewPortWindow(); |
111 void ShowExtraViewPortWindow(); |
120 void SetVScrollCount(Window *w, int num); |
112 void SetVScrollCount(Window *w, int num); |
121 void SetVScroll2Count(Window *w, int num); |
113 void SetVScroll2Count(Window *w, int num); |
122 void SetHScrollCount(Window *w, int num); |
114 void SetHScrollCount(Window *w, int num); |
123 |
115 |
124 void ShowCheatWindow(); |
116 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 |
117 |
139 void BuildFileList(); |
118 void BuildFileList(); |
140 void SetFiosType(const byte fiostype); |
119 void SetFiosType(const byte fiostype); |
141 |
120 |
142 /* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ |
121 /* FIOS_TYPE_FILE, FIOS_TYPE_OLDFILE etc. different colours */ |
144 |
123 |
145 /* bridge_gui.cpp */ |
124 /* bridge_gui.cpp */ |
146 void ShowBuildBridgeWindow(uint start, uint end, byte type); |
125 void ShowBuildBridgeWindow(uint start, uint end, byte type); |
147 |
126 |
148 void ShowBuildIndustryWindow(); |
127 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(); |
128 void ShowMusicWindow(); |
152 |
129 |
153 /* main_gui.cpp */ |
130 /* main_gui.cpp */ |
154 void HandleOnEditText(const char *str); |
131 void HandleOnEditText(const char *str); |
155 VARDEF bool _station_show_coverage; |
132 VARDEF bool _station_show_coverage; |