author | peter1138 |
Tue, 23 May 2006 19:36:50 +0000 | |
changeset 3893 | ced26054ee00 |
parent 3884 | 793081f80381 |
child 4059 | b1e1c1193f0a |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
0 | 3 |
#include "stdafx.h" |
1891
862800791170
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
Darkvater
parents:
1784
diff
changeset
|
4 |
#include "openttd.h" |
1363
775a7ee52369
(svn r1867) Include tables/sprites.h only in files which need it
tron
parents:
1313
diff
changeset
|
5 |
#include "table/sprites.h" |
507
04b5403aaf6b
(svn r815) Include strings.h only in the files which need it.
tron
parents:
337
diff
changeset
|
6 |
#include "table/strings.h" |
2163
b17b313113a0
(svn r2673) Include functions.h directly, not globally via openttd.h
tron
parents:
1977
diff
changeset
|
7 |
#include "functions.h" |
679
04ca2cd69420
(svn r1117) Move map arrays and some related macros into their own files map.c and map.h
tron
parents:
606
diff
changeset
|
8 |
#include "map.h" |
0 | 9 |
#include "window.h" |
10 |
#include "gui.h" |
|
11 |
#include "viewport.h" |
|
12 |
#include "gfx.h" |
|
337
cbe0c766c947
(svn r513) Merge revisions 402, 416, 417, 478, 479, 511, 512 from map to trunk
tron
parents:
193
diff
changeset
|
13 |
#include "sound.h" |
0 | 14 |
#include "command.h" |
15 |
#include "vehicle.h" |
|
16 |
#include "station.h" |
|
17 |
#include "airport.h" |
|
1313
f1013ec3d318
(svn r1817) -Codechange: Moved depot-functions to depot.c
truelight
parents:
1116
diff
changeset
|
18 |
#include "depot.h" |
0 | 19 |
|
20 |
static byte _selected_airport_type; |
|
21 |
||
1093
4fdc46eaf423
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1072
diff
changeset
|
22 |
static void ShowBuildAirportPicker(void); |
0 | 23 |
|
24 |
||
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1914
diff
changeset
|
25 |
void CcBuildAirport(bool success, TileIndex tile, uint32 p1, uint32 p2) |
0 | 26 |
{ |
27 |
if (success) { |
|
541 | 28 |
SndPlayTileFx(SND_1F_SPLAT, tile); |
0 | 29 |
ResetObjectToPlace(); |
30 |
} |
|
31 |
} |
|
32 |
||
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1914
diff
changeset
|
33 |
static void PlaceAirport(TileIndex tile) |
0 | 34 |
{ |
35 |
DoCommandP(tile, _selected_airport_type, 0, CcBuildAirport, CMD_BUILD_AIRPORT | CMD_AUTO | CMD_NO_WATER | CMD_MSG(STR_A001_CAN_T_BUILD_AIRPORT_HERE)); |
|
36 |
} |
|
37 |
||
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1914
diff
changeset
|
38 |
static void PlaceAir_DemolishArea(TileIndex tile) |
0 | 39 |
{ |
40 |
VpStartPlaceSizing(tile, 4); |
|
41 |
} |
|
42 |
||
43 |
||
44 |
static void BuildAirClick_Airport(Window *w) |
|
45 |
{ |
|
1914
2b4b3c3a95b4
(svn r2420) - Codechange: magic number elminitation of cursorsprites.
Darkvater
parents:
1891
diff
changeset
|
46 |
if (HandlePlacePushButton(w, 3, SPR_CURSOR_AIRPORT, 1, PlaceAirport)) ShowBuildAirportPicker(); |
0 | 47 |
} |
48 |
||
49 |
static void BuildAirClick_Demolish(Window *w) |
|
50 |
{ |
|
756
b76998029c12
(svn r1212) -Feature: sticky windows all build-toolbars
darkvater
parents:
751
diff
changeset
|
51 |
HandlePlacePushButton(w, 4, ANIMCURSOR_DEMOLISH, 1, PlaceAir_DemolishArea); |
0 | 52 |
} |
53 |
||
606
da90c837064c
(svn r1030) Some toolbar icons are arranged differently:
dominik
parents:
568
diff
changeset
|
54 |
static void BuildAirClick_Landscaping(Window *w) |
0 | 55 |
{ |
606
da90c837064c
(svn r1030) Some toolbar icons are arranged differently:
dominik
parents:
568
diff
changeset
|
56 |
ShowTerraformToolbar(); |
0 | 57 |
} |
58 |
||
59 |
typedef void OnButtonClick(Window *w); |
|
60 |
static OnButtonClick * const _build_air_button_proc[] = { |
|
61 |
BuildAirClick_Airport, |
|
62 |
BuildAirClick_Demolish, |
|
606
da90c837064c
(svn r1030) Some toolbar icons are arranged differently:
dominik
parents:
568
diff
changeset
|
63 |
BuildAirClick_Landscaping, |
0 | 64 |
}; |
65 |
||
66 |
static void BuildAirToolbWndProc(Window *w, WindowEvent *e) |
|
67 |
{ |
|
2639 | 68 |
switch (e->event) { |
0 | 69 |
case WE_PAINT: |
70 |
DrawWindowWidgets(w); |
|
71 |
break; |
|
72 |
||
73 |
case WE_CLICK: |
|
756
b76998029c12
(svn r1212) -Feature: sticky windows all build-toolbars
darkvater
parents:
751
diff
changeset
|
74 |
if (e->click.widget - 3 >= 0) |
b76998029c12
(svn r1212) -Feature: sticky windows all build-toolbars
darkvater
parents:
751
diff
changeset
|
75 |
_build_air_button_proc[e->click.widget - 3](w); |
0 | 76 |
break; |
1019
6bae6c11e865
(svn r1520) Trim 134 (!) lines with trailing whitespace ):
tron
parents:
946
diff
changeset
|
77 |
|
937
883afa491049
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
78 |
case WE_KEYPRESS: { |
883afa491049
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
79 |
switch (e->keypress.keycode) { |
883afa491049
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
80 |
case '1': BuildAirClick_Airport(w); break; |
883afa491049
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
81 |
case '2': BuildAirClick_Demolish(w); break; |
883afa491049
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
82 |
case 'l': BuildAirClick_Landscaping(w); break; |
2631
2ed0eb408229
(svn r3173) Use the trinary operator and switch to improve readability
tron
parents:
2619
diff
changeset
|
83 |
default: return; |
937
883afa491049
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
84 |
} |
883afa491049
(svn r1425) Added hotkeys for dock and airport toolbar
celestar
parents:
867
diff
changeset
|
85 |
} break; |
0 | 86 |
|
87 |
case WE_PLACE_OBJ: |
|
88 |
_place_proc(e->place.tile); |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
176
diff
changeset
|
89 |
break; |
0 | 90 |
|
91 |
case WE_PLACE_DRAG: { |
|
92 |
VpSelectTilesWithMethod(e->place.pt.x, e->place.pt.y, e->place.userdata); |
|
93 |
return; |
|
94 |
} |
|
95 |
||
96 |
case WE_PLACE_MOUSEUP: |
|
97 |
if (e->place.pt.x != -1) { |
|
98 |
DoCommandP(e->place.tile, e->place.starttile, 0, CcPlaySound10, CMD_CLEAR_AREA | CMD_MSG(STR_00B5_CAN_T_CLEAR_THIS_AREA)); |
|
99 |
} |
|
100 |
break; |
|
101 |
||
102 |
case WE_ABORT_PLACE_OBJ: |
|
756
b76998029c12
(svn r1212) -Feature: sticky windows all build-toolbars
darkvater
parents:
751
diff
changeset
|
103 |
UnclickWindowButtons(w); |
0 | 104 |
SetWindowDirty(w); |
105 |
w = FindWindowById(WC_BUILD_STATION, 0); |
|
106 |
if (w != 0) |
|
107 |
WP(w,def_d).close = true; |
|
108 |
break; |
|
2619
1b20d578a660
(svn r3157) - Feature: Added patch option to link the terraform toolbar to the rail, road, water and airport toolbars. If enabled, the terraform toolbar will open and close with those toolbars.
peter1138
parents:
2186
diff
changeset
|
109 |
|
1b20d578a660
(svn r3157) - Feature: Added patch option to link the terraform toolbar to the rail, road, water and airport toolbars. If enabled, the terraform toolbar will open and close with those toolbars.
peter1138
parents:
2186
diff
changeset
|
110 |
case WE_DESTROY: |
1b20d578a660
(svn r3157) - Feature: Added patch option to link the terraform toolbar to the rail, road, water and airport toolbars. If enabled, the terraform toolbar will open and close with those toolbars.
peter1138
parents:
2186
diff
changeset
|
111 |
if (_patches.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0); |
1b20d578a660
(svn r3157) - Feature: Added patch option to link the terraform toolbar to the rail, road, water and airport toolbars. If enabled, the terraform toolbar will open and close with those toolbars.
peter1138
parents:
2186
diff
changeset
|
112 |
break; |
0 | 113 |
} |
114 |
} |
|
115 |
||
116 |
static const Widget _air_toolbar_widgets[] = { |
|
867
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
117 |
{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, |
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
118 |
{ WWT_CAPTION, RESIZE_NONE, 7, 11, 73, 0, 13, STR_A000_AIRPORTS, STR_018C_WINDOW_TITLE_DRAG_THIS}, |
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
119 |
{ WWT_STICKYBOX, RESIZE_NONE, 7, 74, 85, 0, 13, 0x0, STR_STICKY_BUTTON}, |
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
120 |
{ WWT_PANEL, RESIZE_NONE, 7, 0, 41, 14, 35, 0x2E8, STR_A01E_BUILD_AIRPORT}, |
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
121 |
{ WWT_PANEL, RESIZE_NONE, 7, 42, 63, 14, 35, 0x2BF, STR_018D_DEMOLISH_BUILDINGS_ETC}, |
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
122 |
{ 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
|
123 |
{ WIDGETS_END}, |
0 | 124 |
}; |
125 |
||
126 |
||
127 |
static const WindowDesc _air_toolbar_desc = { |
|
606
da90c837064c
(svn r1030) Some toolbar icons are arranged differently:
dominik
parents:
568
diff
changeset
|
128 |
640-86, 22, 86, 36, |
0 | 129 |
WC_BUILD_TOOLBAR,0, |
756
b76998029c12
(svn r1212) -Feature: sticky windows all build-toolbars
darkvater
parents:
751
diff
changeset
|
130 |
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET | WDF_STICKY_BUTTON, |
0 | 131 |
_air_toolbar_widgets, |
132 |
BuildAirToolbWndProc |
|
133 |
}; |
|
134 |
||
1093
4fdc46eaf423
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1072
diff
changeset
|
135 |
void ShowBuildAirToolbar(void) |
0 | 136 |
{ |
946
2468063f35a4
(svn r1435) Fix: [ 1094092 ] Toolbars accessible via keyboard in spectator mode
dominik
parents:
937
diff
changeset
|
137 |
if (_current_player == OWNER_SPECTATOR) return; |
0 | 138 |
DeleteWindowById(WC_BUILD_TOOLBAR, 0); |
139 |
AllocateWindowDescFront(&_air_toolbar_desc, 0); |
|
2619
1b20d578a660
(svn r3157) - Feature: Added patch option to link the terraform toolbar to the rail, road, water and airport toolbars. If enabled, the terraform toolbar will open and close with those toolbars.
peter1138
parents:
2186
diff
changeset
|
140 |
if (_patches.link_terraform_toolbar) ShowTerraformToolbar(); |
0 | 141 |
} |
142 |
||
143 |
static void BuildAirportPickerWndProc(Window *w, WindowEvent *e) |
|
144 |
{ |
|
1784
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
145 |
switch (e->event) { |
0 | 146 |
case WE_PAINT: { |
147 |
int sel; |
|
792
baa707973bd5
(svn r1262) -Fix: [1088996] kill some warnings for MinGW (luzi82)
darkvater
parents:
787
diff
changeset
|
148 |
int rad = 4; // default catchment radious |
1784
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
149 |
uint32 avail_airports; |
3876
468642825a10
(svn r4918) Move the information about the size of airports from an global array into the struct which describes an airport
tron
parents:
2725
diff
changeset
|
150 |
const AirportFTAClass* airport; |
0 | 151 |
|
1784
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
152 |
if (WP(w,def_d).close) return; |
0 | 153 |
|
154 |
sel = _selected_airport_type; |
|
1784
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
155 |
avail_airports = GetValidAirports(); |
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
156 |
|
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
157 |
if (!HASBIT(avail_airports, 0) && sel == AT_SMALL) sel = AT_LARGE; |
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
158 |
if (!HASBIT(avail_airports, 1) && sel == AT_LARGE) sel = AT_SMALL; |
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
159 |
|
2639 | 160 |
/* 'Country Airport' starts at widget 3, and if its bit is set, it is |
161 |
* available, so take its opposite value to set the disabled_state. There |
|
162 |
* are only 5 available airports, so XOR with 0x1F (1 1111) */ |
|
1784
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
163 |
w->disabled_state = (avail_airports ^ 0x1F) << 3; |
d0698aac0c2e
(svn r2288) - CodeChange: protected the next batch of commands (41 so far, out of 115).
Darkvater
parents:
1363
diff
changeset
|
164 |
|
0 | 165 |
_selected_airport_type = sel; |
166 |
// select default the coverage area to 'Off' (8) |
|
167 |
w->click_state = ((1<<3) << sel) | ((1<<8) << _station_show_coverage); |
|
3876
468642825a10
(svn r4918) Move the information about the size of airports from an global array into the struct which describes an airport
tron
parents:
2725
diff
changeset
|
168 |
airport = GetAirport(sel); |
468642825a10
(svn r4918) Move the information about the size of airports from an global array into the struct which describes an airport
tron
parents:
2725
diff
changeset
|
169 |
SetTileSelectSize(airport->size_x, airport->size_y); |
568
b0d0df062880
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
170 |
|
2631
2ed0eb408229
(svn r3173) Use the trinary operator and switch to improve readability
tron
parents:
2619
diff
changeset
|
171 |
if (_patches.modified_catchment) { |
2ed0eb408229
(svn r3173) Use the trinary operator and switch to improve readability
tron
parents:
2619
diff
changeset
|
172 |
switch (sel) { |
2ed0eb408229
(svn r3173) Use the trinary operator and switch to improve readability
tron
parents:
2619
diff
changeset
|
173 |
case AT_OILRIG: rad = CA_AIR_OILPAD; break; |
2ed0eb408229
(svn r3173) Use the trinary operator and switch to improve readability
tron
parents:
2619
diff
changeset
|
174 |
case AT_HELIPORT: rad = CA_AIR_HELIPORT; break; |
2ed0eb408229
(svn r3173) Use the trinary operator and switch to improve readability
tron
parents:
2619
diff
changeset
|
175 |
case AT_SMALL: rad = CA_AIR_SMALL; break; |
2ed0eb408229
(svn r3173) Use the trinary operator and switch to improve readability
tron
parents:
2619
diff
changeset
|
176 |
case AT_LARGE: rad = CA_AIR_LARGE; break; |
2ed0eb408229
(svn r3173) Use the trinary operator and switch to improve readability
tron
parents:
2619
diff
changeset
|
177 |
case AT_METROPOLITAN: rad = CA_AIR_METRO; break; |
2ed0eb408229
(svn r3173) Use the trinary operator and switch to improve readability
tron
parents:
2619
diff
changeset
|
178 |
case AT_INTERNATIONAL: rad = CA_AIR_INTER; break; |
2ed0eb408229
(svn r3173) Use the trinary operator and switch to improve readability
tron
parents:
2619
diff
changeset
|
179 |
} |
2ed0eb408229
(svn r3173) Use the trinary operator and switch to improve readability
tron
parents:
2619
diff
changeset
|
180 |
} |
867
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
181 |
|
2639 | 182 |
if (_station_show_coverage) SetTileSelectBigSize(-rad, -rad, 2 * rad, 2 * rad); |
0 | 183 |
|
184 |
DrawWindowWidgets(w); |
|
185 |
// strings such as 'Size' and 'Coverage Area' |
|
186 |
DrawStringCentered(74, 16, STR_305B_SIZE, 0); |
|
187 |
DrawStringCentered(74, 78, STR_3066_COVERAGE_AREA_HIGHLIGHT, 0); |
|
568
b0d0df062880
(svn r979) Allow more realistically sized catchment areas
Celestar
parents:
543
diff
changeset
|
188 |
DrawStationCoverageAreaText(2, 104, (uint)-1, rad); |
0 | 189 |
break; |
190 |
} |
|
191 |
||
192 |
case WE_CLICK: { |
|
2639 | 193 |
switch (e->click.widget) { |
0 | 194 |
case 3: case 4: case 5: case 6: case 7: |
195 |
_selected_airport_type = e->click.widget - 3; |
|
541 | 196 |
SndPlayFx(SND_15_BEEP); |
0 | 197 |
SetWindowDirty(w); |
198 |
break; |
|
199 |
case 8: case 9: |
|
200 |
_station_show_coverage = e->click.widget - 8; |
|
541 | 201 |
SndPlayFx(SND_15_BEEP); |
0 | 202 |
SetWindowDirty(w); |
203 |
break; |
|
204 |
} |
|
205 |
} break; |
|
206 |
||
207 |
case WE_MOUSELOOP: { |
|
208 |
if (WP(w,def_d).close) { |
|
209 |
DeleteWindow(w); |
|
210 |
return; |
|
211 |
} |
|
212 |
||
213 |
CheckRedrawStationCoverage(w); |
|
214 |
} break; |
|
1109
ecb98f43ba2c
(svn r1610) Remove trailing whitespace (last time ever, i hope)
tron
parents:
1093
diff
changeset
|
215 |
|
1072
74cd9150d473
(svn r1573) -Fix: Station and depot building mode is now terminated if the
celestar
parents:
1019
diff
changeset
|
216 |
case WE_DESTROY: |
2639 | 217 |
if (!WP(w,def_d).close) ResetObjectToPlace(); |
1072
74cd9150d473
(svn r1573) -Fix: Station and depot building mode is now terminated if the
celestar
parents:
1019
diff
changeset
|
218 |
break; |
0 | 219 |
} |
220 |
} |
|
221 |
||
222 |
static const Widget _build_airport_picker_widgets[] = { |
|
867
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
223 |
{ WWT_CLOSEBOX, RESIZE_NONE, 7, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW}, |
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
224 |
{ WWT_CAPTION, RESIZE_NONE, 7, 11, 147, 0, 13, STR_3001_AIRPORT_SELECTION, STR_018C_WINDOW_TITLE_DRAG_THIS}, |
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
225 |
{ WWT_PANEL, RESIZE_NONE, 7, 0, 147, 14, 130, 0x0, STR_NULL}, |
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
226 |
{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 73, 27, 38, STR_3059_SMALL, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, |
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
227 |
{WWT_NODISTXTBTN, RESIZE_NONE, 14, 74, 145, 27, 38, STR_305A_LARGE, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, |
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
228 |
{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 63, 74, STR_306B_HELIPORT, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, |
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
229 |
{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 39, 50, STR_305AA_LARGE, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, |
dffd33233237
(svn r1348) -Feature: resizable windows. Read the comment in window.h to find out
truelight
parents:
792
diff
changeset
|
230 |
{WWT_NODISTXTBTN, RESIZE_NONE, 14, 2, 145, 51, 62, STR_305AB_LARGE, STR_3058_SELECT_SIZE_TYPE_OF_AIRPORT}, |
2725
775e3e14ca46
(svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing.
peter1138
parents:
2639
diff
changeset
|
231 |
{ WWT_TEXTBTN, RESIZE_NONE, 14, 14, 73, 88, 98, STR_02DB_OFF, STR_3065_DON_T_HIGHLIGHT_COVERAGE}, |
775e3e14ca46
(svn r3270) Correct all (mis)uses of WWT_CLOSEBOX / WWT_TEXTBTN to reflect their actual use, and add "Close Window" tooltip where missing.
peter1138
parents:
2639
diff
changeset
|
232 |
{ WWT_TEXTBTN, 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
|
233 |
{ WIDGETS_END}, |
0 | 234 |
}; |
235 |
||
236 |
static const WindowDesc _build_airport_desc = { |
|
237 |
-1, -1, 148, 131, // height, 130+1 |
|
238 |
WC_BUILD_STATION,WC_BUILD_TOOLBAR, |
|
239 |
WDF_STD_TOOLTIPS | WDF_STD_BTN | WDF_DEF_WIDGET, |
|
240 |
_build_airport_picker_widgets, |
|
241 |
BuildAirportPickerWndProc |
|
242 |
}; |
|
243 |
||
1093
4fdc46eaf423
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1072
diff
changeset
|
244 |
static void ShowBuildAirportPicker(void) |
0 | 245 |
{ |
246 |
AllocateWindowDesc(&_build_airport_desc); |
|
247 |
} |
|
248 |
||
1093
4fdc46eaf423
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1072
diff
changeset
|
249 |
void InitializeAirportGui(void) |
0 | 250 |
{ |
251 |
_selected_airport_type = AT_SMALL; |
|
252 |
} |