diff options
author | glx22 <glx@openttd.org> | 2021-05-17 15:46:38 +0200 |
---|---|---|
committer | Loïc Guilloux <glx22@users.noreply.github.com> | 2021-05-29 21:08:25 +0200 |
commit | 5799402f7a4872d03809838dd7fa01db42bbd282 (patch) | |
tree | 6b54e235c14621035b4ec7923edb93980be5f056 /src/airport_gui.cpp | |
parent | 994bf19aef3dde6c9482434bdc51688f76a937ea (diff) | |
download | openttd-5799402f7a4872d03809838dd7fa01db42bbd282.tar.xz |
Codechange: Rename window related DeleteXXX to match new behaviour
Diffstat (limited to 'src/airport_gui.cpp')
-rw-r--r-- | src/airport_gui.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/airport_gui.cpp b/src/airport_gui.cpp index 1941a8602..cfe0ca4cb 100644 --- a/src/airport_gui.cpp +++ b/src/airport_gui.cpp @@ -79,7 +79,7 @@ struct BuildAirToolbarWindow : Window { void Close() override { if (this->IsWidgetLowered(WID_AT_AIRPORT)) SetViewportCatchmentStation(nullptr, true); - if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false); + if (_settings_client.gui.link_terraform_toolbar) CloseWindowById(WC_SCEN_LAND_GEN, 0, false); this->Window::Close(); } @@ -97,7 +97,7 @@ struct BuildAirToolbarWindow : Window { WID_AT_AIRPORT, WIDGET_LIST_END); if (!can_build) { - DeleteWindowById(WC_BUILD_STATION, TRANSPORT_AIR); + CloseWindowById(WC_BUILD_STATION, TRANSPORT_AIR); /* Show in the tooltip why this button is disabled. */ this->GetWidget<NWidgetCore>(WID_AT_AIRPORT)->SetToolTip(STR_TOOLBAR_DISABLED_NO_VEHICLE_AVAILABLE); @@ -159,8 +159,8 @@ struct BuildAirToolbarWindow : Window { this->RaiseButtons(); - DeleteWindowById(WC_BUILD_STATION, TRANSPORT_AIR); - DeleteWindowById(WC_SELECT_STATION, 0); + CloseWindowById(WC_BUILD_STATION, TRANSPORT_AIR); + CloseWindowById(WC_SELECT_STATION, 0); } static HotkeyList hotkeys; @@ -218,7 +218,7 @@ Window *ShowBuildAirToolbar() { if (!Company::IsValidID(_local_company)) return nullptr; - DeleteWindowByClass(WC_BUILD_TOOLBAR); + CloseWindowByClass(WC_BUILD_TOOLBAR); return AllocateWindowDescFront<BuildAirToolbarWindow>(&_air_toolbar_desc, TRANSPORT_AIR); } @@ -279,7 +279,7 @@ public: void Close() override { - DeleteWindowById(WC_SELECT_STATION, 0); + CloseWindowById(WC_SELECT_STATION, 0); this->PickerWindowBase::Close(); } |