41 static void ShowBuildAirportPicker(
Window *parent);
47 if (result.
Failed())
return;
61 SB(p2, 16, 16, INVALID_STATION);
90 ShowBuildAirportPicker(
this);
91 this->last_user_action = widget;
97 this->last_user_action = widget;
107 switch (this->last_user_action) {
116 default: NOT_REACHED();
156 static Hotkey airtoolbar_hotkeys[] = {
163 static const NWidgetPart _nested_air_toolbar_widgets[] = {
180 _nested_air_toolbar_widgets,
lengthof(_nested_air_toolbar_widgets),
181 &BuildAirToolbarWindow::hotkeys
196 return AllocateWindowDescFront<BuildAirToolbarWindow>(&_air_toolbar_desc,
TRANSPORT_AIR);
209 for (uint i = 0; i < AirportClass::GetClassCount(); i++) {
240 bool selectFirstAirport =
true;
246 selectFirstAirport =
false;
247 this->UpdateSelectSize();
271 if (
string != STR_UNDEFINED) {
274 SetDParam(0, STR_STATION_BUILD_AIRPORT_LAYOUT_NAME);
289 for (uint i = 0; i < AirportClass::GetClassCount(); i++) {
293 d.width += padding.width;
294 d.height += padding.height;
308 size->height = 5 * this->line_height;
316 for (byte layout = 0; layout < as->
num_table; layout++) {
317 SpriteID sprite = GetCustomAirportSprite(as, layout);
332 for (byte layout = 0; layout < as->
num_table; layout++) {
334 if (
string == STR_UNDEFINED)
continue;
360 y += this->line_height;
376 if (
string != STR_UNDEFINED) {
420 void SelectOtherAirport(
int airport_index)
425 this->UpdateSelectSize();
429 void UpdateSelectSize()
462 if (num_clicked >= this->vscroll->
GetCount())
break;
464 if (as->
IsAvailable()) this->SelectOtherAirport(num_clicked);
474 this->UpdateSelectSize();
479 this->UpdateSelectSize();
485 this->UpdateSelectSize();
500 for (uint i = 0; i < sel_apclass->
GetSpecCount(); i++) {
503 this->SelectOtherAirport(i);
516 this->SelectOtherAirport(i);
523 this->SelectOtherAirport(-1);
540 static const NWidgetPart _nested_build_airport_widgets[] = {
567 SetDataTip(STR_STATION_BUILD_COVERAGE_OFF, STR_STATION_BUILD_COVERAGE_AREA_OFF_TOOLTIP),
569 SetDataTip(STR_STATION_BUILD_COVERAGE_ON, STR_STATION_BUILD_COVERAGE_AREA_ON_TOOLTIP),
578 WDP_AUTO,
"build_station_air", 0, 0,
581 _nested_build_airport_widgets,
lengthof(_nested_build_airport_widgets)
584 static void ShowBuildAirportPicker(
Window *parent)
589 void InitializeAirportGui()