summaryrefslogtreecommitdiff
path: root/src/rail_gui.cpp
diff options
context:
space:
mode:
authorglx22 <glx@openttd.org>2021-05-17 15:46:38 +0200
committerLoïc Guilloux <glx22@users.noreply.github.com>2021-05-29 21:08:25 +0200
commit5799402f7a4872d03809838dd7fa01db42bbd282 (patch)
tree6b54e235c14621035b4ec7923edb93980be5f056 /src/rail_gui.cpp
parent994bf19aef3dde6c9482434bdc51688f76a937ea (diff)
downloadopenttd-5799402f7a4872d03809838dd7fa01db42bbd282.tar.xz
Codechange: Rename window related DeleteXXX to match new behaviour
Diffstat (limited to 'src/rail_gui.cpp')
-rw-r--r--src/rail_gui.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp
index bb5244ae7..871938d20 100644
--- a/src/rail_gui.cpp
+++ b/src/rail_gui.cpp
@@ -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;
}
}