Rename close window functions to match upstream

This commit is contained in:
Jonathan G Rennison
2023-09-15 20:59:08 +01:00
parent ed1b842ad3
commit a18f3274b4
75 changed files with 291 additions and 299 deletions

View File

@@ -81,7 +81,7 @@ struct BuildAirToolbarWindow : Window {
~BuildAirToolbarWindow()
{
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);
}
/**
@@ -98,7 +98,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);
@@ -160,8 +160,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;
@@ -219,7 +219,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);
}
@@ -280,7 +280,7 @@ public:
virtual ~BuildAirportWindow()
{
DeleteWindowById(WC_SELECT_STATION, 0);
CloseWindowById(WC_SELECT_STATION, 0);
}
void SetStringParameters(int widget) const override