Codechange: Rename window related DeleteXXX to match new behaviour

This commit is contained in:
glx22
2021-05-17 15:46:38 +02:00
committed by Loïc Guilloux
parent 994bf19aef
commit 5799402f7a
63 changed files with 253 additions and 253 deletions

View File

@@ -291,7 +291,7 @@ void CcBuildRailTunnel(const CommandCost &result, TileIndex tile, uint32 p1, uin
*/
static void ToggleRailButton_Remove(Window *w)
{
DeleteWindowById(WC_SELECT_STATION, 0);
CloseWindowById(WC_SELECT_STATION, 0);
w->ToggleWidgetLoweredState(WID_RAT_REMOVE);
w->SetWidgetDirty(WID_RAT_REMOVE);
_remove_button_clicked = w->IsWidgetLowered(WID_RAT_REMOVE);
@@ -437,7 +437,7 @@ struct BuildRailToolbarWindow : Window {
void Close() override
{
if (this->IsWidgetLowered(WID_RAT_BUILD_STATION)) 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();
}
@@ -743,12 +743,12 @@ struct BuildRailToolbarWindow : Window {
this->DisableWidget(WID_RAT_REMOVE);
this->SetWidgetDirty(WID_RAT_REMOVE);
DeleteWindowById(WC_BUILD_SIGNAL, TRANSPORT_RAIL);
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_RAIL);
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_RAIL);
DeleteWindowById(WC_BUILD_WAYPOINT, TRANSPORT_RAIL);
DeleteWindowById(WC_SELECT_STATION, 0);
DeleteWindowByClass(WC_BUILD_BRIDGE);
CloseWindowById(WC_BUILD_SIGNAL, TRANSPORT_RAIL);
CloseWindowById(WC_BUILD_STATION, TRANSPORT_RAIL);
CloseWindowById(WC_BUILD_DEPOT, TRANSPORT_RAIL);
CloseWindowById(WC_BUILD_WAYPOINT, TRANSPORT_RAIL);
CloseWindowById(WC_SELECT_STATION, 0);
CloseWindowByClass(WC_BUILD_BRIDGE);
}
void OnPlacePresize(Point pt, TileIndex tile) override
@@ -865,7 +865,7 @@ Window *ShowBuildRailToolbar(RailType railtype)
if (!Company::IsValidID(_local_company)) return nullptr;
if (!ValParamRailtype(railtype)) return nullptr;
DeleteWindowByClass(WC_BUILD_TOOLBAR);
CloseWindowByClass(WC_BUILD_TOOLBAR);
_cur_railtype = railtype;
_remove_button_clicked = false;
return new BuildRailToolbarWindow(&_build_rail_desc, railtype);
@@ -1031,7 +1031,7 @@ public:
void Close() override
{
DeleteWindowById(WC_SELECT_STATION, 0);
CloseWindowById(WC_SELECT_STATION, 0);
this->PickerWindowBase::Close();
}
@@ -1347,7 +1347,7 @@ public:
this->LowerWidget(_railstation.orientation + WID_BRAS_PLATFORM_DIR_X);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
this->SetDirty();
DeleteWindowById(WC_SELECT_STATION, 0);
CloseWindowById(WC_SELECT_STATION, 0);
break;
case WID_BRAS_PLATFORM_NUM_1:
@@ -1381,7 +1381,7 @@ public:
this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
this->SetDirty();
DeleteWindowById(WC_SELECT_STATION, 0);
CloseWindowById(WC_SELECT_STATION, 0);
break;
}
@@ -1416,7 +1416,7 @@ public:
this->LowerWidget(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
this->SetDirty();
DeleteWindowById(WC_SELECT_STATION, 0);
CloseWindowById(WC_SELECT_STATION, 0);
break;
}
@@ -1450,7 +1450,7 @@ public:
this->SetWidgetLoweredState(_settings_client.gui.station_platlength + WID_BRAS_PLATFORM_LEN_BEGIN, !_settings_client.gui.station_dragdrop);
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
this->SetDirty();
DeleteWindowById(WC_SELECT_STATION, 0);
CloseWindowById(WC_SELECT_STATION, 0);
break;
}
@@ -1483,7 +1483,7 @@ public:
}
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
this->SetDirty();
DeleteWindowById(WC_SELECT_STATION, 0);
CloseWindowById(WC_SELECT_STATION, 0);
break;
}
@@ -1502,7 +1502,7 @@ public:
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
this->SetDirty();
DeleteWindowById(WC_SELECT_STATION, 0);
CloseWindowById(WC_SELECT_STATION, 0);
break;
}
}