author | tron |
Fri, 24 Jun 2005 12:38:35 +0000 | |
changeset 1977 | 4392ae3d8e31 |
parent 1914 | 5ede46fd496f |
child 2163 | 637ec3c361f5 |
permissions | -rw-r--r-- |
0 | 1 |
#include "stdafx.h" |
1891
92a3b0aa0946
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
Darkvater
parents:
1784
diff
changeset
|
2 |
#include "openttd.h" |
1363
01d3de5d8039
(svn r1867) Include tables/sprites.h only in files which need it
tron
parents:
1313
diff
changeset
|
3 |
#include "table/sprites.h" |
507
8aa8100b0b22
(svn r815) Include strings.h only in the files which need it.
tron
parents:
337
diff
changeset
|
4 |
#include "table/strings.h" |
679
e959706a3e4d
(svn r1117) Move map arrays and some related macros into their own files map.c and map.h
tron
parents:
606
diff
changeset
|
5 |
#include "map.h" |
0 | 6 |
#include "window.h" |
7 |
#include "gui.h" |
|
8 |
#include "viewport.h" |
|
9 |
#include "gfx.h" |
|
337
66647f97e7c0
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
193
diff
changeset
|
10 |
#include "sound.h" |
0 | 11 |
#include "command.h" |
12 |
#include "vehicle.h" |
|
13 |
#include "station.h" |
|
14 |
#include "airport.h" |
|
1313
bba6afb8a995
(svn r1817) -Codechange: Moved depot-functions to depot.c
truelight
parents:
1116
diff
changeset
|
15 |
#include "depot.h" |
0 | 16 |
|
17 |
static byte _selected_airport_type; |
|
18 |
||
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1072
diff
changeset
|
19 |
static void ShowBuildAirportPicker(void); |
0 | 20 |
|
21 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1914
diff
changeset
|
22 |
void CcBuildAirport(bool success, TileIndex tile, uint32 p1, uint32 p2) |
0 | 23 |
{ |
24 |
if (success) { |
|
541 | 25 |
SndPlayTileFx(SND_1F_SPLAT, tile); |
0 | 26 |
ResetObjectToPlace(); |
27 |
} |
|
28 |
} |
|
29 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1914
diff
changeset
|
30 |
static void PlaceAirport(TileIndex tile) |
0 | 31 |
{ |
32 |
DoCommandP(tile, _selected_airport_type, 0, CcBuildAirport, CMD_BUILD_AIRPORT | CMD_AUTO | CMD_NO_WATER | CMD_MSG(STR_A001_CAN_T_BUILD_AIRPORT_HERE)); |
|
33 |
} |
|
34 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1914
diff
changeset
|
35 |
static void PlaceAir_DemolishArea(TileIndex tile) |
0 | 36 |
{ |
37 |
VpStartPlaceSizing(tile, 4); |
|
38 |
} |
|
39 |
||
40 |
||
41 |
static void BuildAirClick_Airport(Window *w) |
|
42 |
{ |
|
1914
5ede46fd496f
(svn r2420) - Codechange: magic number elminitation of cursorsprites.
Darkvater
parents:
1891
diff
changeset
|
43 |
if (HandlePlacePushButton(w, 3, SPR_CURSOR_AIRPORT, 1, PlaceAirport)) ShowBuildAirportPicker(); |
0 | 44 |
} |
45 |
||
46 |
static void BuildAirClick_Demolish(Window *w) |
|
47 |
{ |
|
756
d1f1dc31b6f4
(svn r1212) -Feature: sticky windows all build-toolbars
darkvater
parents:
751
diff
changeset
|
48 |
HandlePlacePushButton(w, 4, ANIMCURSOR_DEMOLISH, 1, PlaceAir_DemolishArea); |
0 | 49 |
} |
50 |
||
606
0e507bb0f63a
(svn r1030) Some toolbar icons are arranged differently:
dominik
parents:
568
diff
changeset
|
51 |
static void BuildAirClick_Landscaping(Window *w) |
0 | 52 |
{ |
606
0e507bb0f63a
(svn r1030) Some toolbar icons are arranged differently:
dominik
parents:
568
diff
changeset
|
53 |
ShowTerraformToolbar(); |
0 | 54 |
} |
55 |
||
56 |
typedef void OnButtonClick(Window *w); |
|
57 |
static OnButtonClick * const _build_air_button_proc[] = { |
|
58 |
BuildAirClick_Airport, |
|
59 |
BuildAirClick_Demolish, |
|
606
0e507bb0f63a
(svn r1030) Some toolbar icons are arranged differently:
dominik
parents:
568
diff
changeset
|
60 |
BuildAirClick_Landscaping, |
0 | 61 |
}; |
62 |
||
63 |
static void BuildAirToolbWndProc(Window *w, WindowEvent *e) |
|
64 |
{ |
|
65 |
switch(e->event) { |
|
66 |
case WE_PAINT: |
|
67 |
DrawWindowWidgets(w); |
|
68 |
break; |
|
69 |
||
70 |
case WE_CLICK: |
|
756
d1f1dc31b6f4
(svn r1212) -Feature: sticky windows all build-toolbars
darkvater
parents:
751
diff
changeset
|
71 |
if (e->click.widget - 3 >= 0) |
d1f1dc31b6f4
(svn r1212) -Feature: sticky windows all build-toolbars
darkvater
parents:
751
diff
changeset
|
72 |
_build_air_button_proc[e->click.widget - 3](w); |
0 | 73 |
break; |
1019
6363b8a4273e
(svn r1520) Trim 134 (!) lines with trailing whitespace ):
tron
parents:
946
diff
changeset
|
74 |
|
937
a8dfd3eb406f
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
75 |
case WE_KEYPRESS: { |
a8dfd3eb406f
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
76 |
switch (e->keypress.keycode) { |
a8dfd3eb406f
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
77 |
case '1': BuildAirClick_Airport(w); break; |
a8dfd3eb406f
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
78 |
case '2': BuildAirClick_Demolish(w); break; |
a8dfd3eb406f
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
79 |
case 'l': BuildAirClick_Landscaping(w); break; |
a8dfd3eb406f
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
80 |
default: |
a8dfd3eb406f
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
81 |
return; |
a8dfd3eb406f
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
82 |
} |
a8dfd3eb406f
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
83 |
} break; |
0 | 84 |
|
85 |
case WE_PLACE_OBJ: |
|
86 |
_place_proc(e->place.tile); |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
176
diff
changeset
|
87 |
break; |
0 | 88 |
|
89 |
case WE_PLACE_DRAG: { |
|
90 |
VpSelectTilesWithMethod(e->place.pt.x, e->place.pt.y, e->place.userdata); |
|
91 |
return; |
|
92 |
} |
|
93 |
||
94 |
case WE_PLACE_MOUSEUP: |
|
95 |
if (e->place.pt.x != -1) { |
|
96 |
DoCommandP(e->place.tile, e->place.starttile, 0, CcPlaySound10, CMD_CLEAR_AREA | CMD_MSG(STR_00B5_CAN_T_CLEAR_THIS_AREA)); |
|
97 |
} |
|
98 |
break; |
|
99 |
||
100 |
case WE_ABORT_PLACE_OBJ: |
|
756
d1f1dc31b6f4
(svn r1212) -Feature: sticky windows all build-toolbars
darkvater
parents:
751
diff
changeset
|
101 |
UnclickWindowButtons(w); |
0 | 102 |
SetWindowDirty(w); |
103 |
w = FindWindowById(WC_BUILD_STATION, 0); |
|
104 |
if (w != 0) |
|
105 |
WP(w,def_d).close = true; |
|
106 |
break; |
|
107 |
} |
|
108 |
} |
|
109 |
||
110 |
static const Widget _air_toolbar_widgets[] = { |
|
867
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
111 |
{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
112 |
{ WWT_CAPTION, RESIZE_NONE, 7, 11, 73, 0, 13, STR_A000_AIRPORTS, STR_018C_WINDOW_TITLE_DRAG_THIS}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
113 |
{ WWT_STICKYBOX, RESIZE_NONE, 7, 74, 85, 0, 13, 0x0, STR_STICKY_BUTTON}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
114 |
{ WWT_PANEL, RESIZE_NONE, 7, 0, 41, 14, 35, 0x2E8, STR_A01E_BUILD_AIRPORT}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
115 |
{ WWT_PANEL, RESIZE_NONE, 7, 42, 63, 14, 35, 0x2BF, STR_018D_DEMOLISH_BUILDINGS_ETC}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
116 |
{ WWT_PANEL, RESIZE_NONE, 7, 64, 85, 14, 35, SPR_IMG_LANDSCAPING, STR_LANDSCAPING_TOOLBAR_TIP}, |
176
84990c4b9212
(svn r177) -Fix: padded out Widget code to solve warnings on C99 compiler (Tron)
darkvater
parents:
0
diff
changeset
|
117 |
{ WIDGETS_END}, |
0 | 118 |
}; |
119 |
||
120 |
||
121 |
static const WindowDesc _air_toolbar_desc = { |
|
606
0e507bb0f63a
(svn r1030) Some toolbar icons are arranged differently:
dominik
parents:
568
diff
changeset
|
122 |
640-86, 22, 86, 36, |
0 | 123 |
WC_BUILD_TOOLBAR,0, |
756
d1f1dc31b6f4
(svn r1212) -Feature: sticky windows all build-toolbars
darkvater
parents:
751
diff
changeset
|
124 |
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, |
0 | 125 |
_air_toolbar_widgets, |
126 |
BuildAirToolbWndProc |
|
127 |
}; |
|
128 |
||
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1072
diff
changeset
|
129 |
void ShowBuildAirToolbar(void) |
0 | 130 |
{ |
946
81cf624bbdc5
(svn r1435) Fix: [ 1094092 ] Toolbars accessible via keyboard in spectator mode
dominik
parents:
937
diff
changeset
|
131 |
if (_current_player == OWNER_SPECTATOR) return; |
0 | 132 |
DeleteWindowById(WC_BUILD_TOOLBAR, 0); |
133 |
AllocateWindowDescFront(&_air_toolbar_desc, 0); |
|
134 |
} |
|
135 |
||
136 |
static void BuildAirportPickerWndProc(Window *w, WindowEvent *e) |
|
137 |
{ |
|
1784
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
138 |
switch (e->event) { |
0 | 139 |
case WE_PAINT: { |
140 |
int sel; |
|
792
d8a4164fdb14
(svn r1262) -Fix: [1088996] kill some warnings for MinGW (luzi82)
darkvater
parents:
787
diff
changeset
|
141 |
int rad = 4; // default catchment radious |
1784
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
142 |
uint32 avail_airports; |
0 | 143 |
|
1784
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
144 |
if (WP(w,def_d).close) return; |
0 | 145 |
|
146 |
sel = _selected_airport_type; |
|
1784
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
147 |
avail_airports = GetValidAirports(); |
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
148 |
|
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
149 |
if (!HASBIT(avail_airports, 0) && sel == AT_SMALL) sel = AT_LARGE; |
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
150 |
if (!HASBIT(avail_airports, 1) && sel == AT_LARGE) sel = AT_SMALL; |
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
151 |
|
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
152 |
/* 'Country Airport' starts at widget 3, and if its bit is set, it is available, |
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
153 |
* so take its opposite value to set the disabled_state. There are only 5 available |
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
154 |
* airports, so XOr with 0x1F (1 1111) */ |
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
155 |
w->disabled_state = (avail_airports ^ 0x1F) << 3; |
6eb3ab1bc33c
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
156 |
|
0 | 157 |
_selected_airport_type = sel; |
158 |
// select default the coverage area to 'Off' (8) |
|
159 |
w->click_state = ((1<<3) << sel) | ((1<<8) << _station_show_coverage); |
|
160 |
SetTileSelectSize(_airport_size_x[sel],_airport_size_y[sel]); |
|
568
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
161 |
|
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
162 |
if (_patches.modified_catchment) { |
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
163 |
switch (sel) { |
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
164 |
case AT_OILRIG: rad = CA_AIR_OILPAD; break; |
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
165 |
case AT_HELIPORT: rad = CA_AIR_HELIPORT; break; |
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
166 |
case AT_SMALL: rad = CA_AIR_SMALL; break; |
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
167 |
case AT_LARGE: rad = CA_AIR_LARGE; break; |
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
168 |
case AT_METROPOLITAN: rad = CA_AIR_METRO; break; |
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
169 |
case AT_INTERNATIONAL: rad = CA_AIR_INTER; break; |
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
170 |
} |
792
d8a4164fdb14
(svn r1262) -Fix: [1088996] kill some warnings for MinGW (luzi82)
darkvater
parents:
787
diff
changeset
|
171 |
} |
867
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
172 |
|
568
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
173 |
if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad); |
0 | 174 |
|
175 |
DrawWindowWidgets(w); |
|
176 |
// strings such as 'Size' and 'Coverage Area' |
|
177 |
DrawStringCentered(74, 16, STR_305B_SIZE, 0); |
|
178 |
DrawStringCentered(74, 78, STR_3066_COVERAGE_AREA_HIGHLIGHT, 0); |
|
568
6eb7d394fb35
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
179 |
DrawStationCoverageAreaText(2, 104, (uint)-1, rad); |
0 | 180 |
break; |
181 |
} |
|
182 |
||
183 |
case WE_CLICK: { |
|
184 |
switch(e->click.widget) { |
|
185 |
case 3: case 4: case 5: case 6: case 7: |
|
186 |
_selected_airport_type = e->click.widget - 3; |
|
541 | 187 |
SndPlayFx(SND_15_BEEP); |
0 | 188 |
SetWindowDirty(w); |
189 |
break; |
|
190 |
case 8: case 9: |
|
191 |
_station_show_coverage = e->click.widget - 8; |
|
541 | 192 |
SndPlayFx(SND_15_BEEP); |
0 | 193 |
SetWindowDirty(w); |
194 |
break; |
|
195 |
} |
|
196 |
} break; |
|
197 |
||
198 |
case WE_MOUSELOOP: { |
|
199 |
if (WP(w,def_d).close) { |
|
200 |
DeleteWindow(w); |
|
201 |
return; |
|
202 |
} |
|
203 |
||
204 |
CheckRedrawStationCoverage(w); |
|
205 |
} break; |
|
1109
1bab892228cd
(svn r1610) Remove trailing whitespace (last time ever, i hope)
tron
parents:
1093
diff
changeset
|
206 |
|
1072
01bf9fc64236
(svn r1573) -Fix: Station and depot building mode is now terminated if the
celestar
parents:
1019
diff
changeset
|
207 |
case WE_DESTROY: |
1116
a38aed715c95
(svn r1617) -Fix: Ugly hack to only call ResetObjectToPlaceon childwindows of build-toolbar if the window is closed manually (with 'X'); if not checked ResetObjectToPlace is called twice resulting in undesired actions (eg. clicked button is unclicked immediately).
darkvater
parents:
1109
diff
changeset
|
208 |
if (!WP(w,def_d).close) |
a38aed715c95
(svn r1617) -Fix: Ugly hack to only call ResetObjectToPlaceon childwindows of build-toolbar if the window is closed manually (with 'X'); if not checked ResetObjectToPlace is called twice resulting in undesired actions (eg. clicked button is unclicked immediately).
darkvater
parents:
1109
diff
changeset
|
209 |
ResetObjectToPlace(); |
1072
01bf9fc64236
(svn r1573) -Fix: Station and depot building mode is now terminated if the
celestar
parents:
1019
diff
changeset
|
210 |
break; |
0 | 211 |
} |
212 |
} |
|
213 |
||
214 |
static const Widget _build_airport_picker_widgets[] = { |
|
867
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
215 |
{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
216 |
{ WWT_CAPTION, RESIZE_NONE, 7, 11, 147, 0, 13, STR_3001_AIRPORT_SELECTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
217 |
{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 14, 130, 0x0, STR_NULL}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
218 |
{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 73, 27, 38, STR_3059_SMALL, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
219 |
{WWT_NODISTXTBTN, RESIZE_NONE, 14, 74, 145, 27, 38, STR_305A_LARGE, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
220 |
{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 63, 74, STR_306B_HELIPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
221 |
{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 39, 50, STR_305AA_LARGE, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
222 |
{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 51, 62, STR_305AB_LARGE, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
223 |
{ WWT_CLOSEBOX, RESIZE_NONE, 14, 14, 73, 88, 98, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, |
581154a08a78
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
224 |
{ WWT_CLOSEBOX, RESIZE_NONE, 14, 74, 133, 88, 98, STR_02DA_ON, STR_3064_HIGHLIGHT_COVERAGE_AREA}, |
176
84990c4b9212
(svn r177) -Fix: padded out Widget code to solve warnings on C99 compiler (Tron)
darkvater
parents:
0
diff
changeset
|
225 |
{ WIDGETS_END}, |
0 | 226 |
}; |
227 |
||
228 |
static const WindowDesc _build_airport_desc = { |
|
229 |
-1, -1, 148, 131, // height, 130+1 |
|
230 |
WC_BUILD_STATION,WC_BUILD_TOOLBAR, |
|
231 |
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
|
232 |
_build_airport_picker_widgets, |
|
233 |
BuildAirportPickerWndProc |
|
234 |
}; |
|
235 |
||
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1072
diff
changeset
|
236 |
static void ShowBuildAirportPicker(void) |
0 | 237 |
{ |
238 |
AllocateWindowDesc(&_build_airport_desc); |
|
239 |
} |
|
240 |
||
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1072
diff
changeset
|
241 |
void InitializeAirportGui(void) |
0 | 242 |
{ |
243 |
_selected_airport_type = AT_SMALL; |
|
244 |
_last_built_aircraft_depot_tile = 0; |
|
245 |
} |