Rename close window functions to match upstream
This commit is contained in:
@@ -109,7 +109,7 @@ struct BuildDocksToolbarWindow : Window {
|
||||
~BuildDocksToolbarWindow()
|
||||
{
|
||||
if (_game_mode == GM_NORMAL && this->IsWidgetLowered(WID_DT_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);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -128,8 +128,8 @@ struct BuildDocksToolbarWindow : Window {
|
||||
WID_DT_BUOY,
|
||||
WIDGET_LIST_END);
|
||||
if (!can_build) {
|
||||
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_WATER);
|
||||
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER);
|
||||
CloseWindowById(WC_BUILD_STATION, TRANSPORT_WATER);
|
||||
CloseWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER);
|
||||
}
|
||||
|
||||
if (_game_mode != GM_EDITOR) {
|
||||
@@ -266,10 +266,10 @@ struct BuildDocksToolbarWindow : Window {
|
||||
|
||||
this->RaiseButtons();
|
||||
|
||||
DeleteWindowById(WC_BUILD_STATION, TRANSPORT_WATER);
|
||||
DeleteWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER);
|
||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||
DeleteWindowByClass(WC_BUILD_BRIDGE);
|
||||
CloseWindowById(WC_BUILD_STATION, TRANSPORT_WATER);
|
||||
CloseWindowById(WC_BUILD_DEPOT, TRANSPORT_WATER);
|
||||
CloseWindowById(WC_SELECT_STATION, 0);
|
||||
CloseWindowByClass(WC_BUILD_BRIDGE);
|
||||
}
|
||||
|
||||
void OnPlacePresize(Point pt, TileIndex tile_from) override
|
||||
@@ -366,7 +366,7 @@ Window *ShowBuildDocksToolbar()
|
||||
{
|
||||
if (!Company::IsValidID(_local_company)) return nullptr;
|
||||
|
||||
DeleteWindowByClass(WC_BUILD_TOOLBAR);
|
||||
CloseWindowByClass(WC_BUILD_TOOLBAR);
|
||||
return AllocateWindowDescFront<BuildDocksToolbarWindow>(&_build_docks_toolbar_desc, TRANSPORT_WATER);
|
||||
}
|
||||
|
||||
@@ -427,7 +427,7 @@ public:
|
||||
|
||||
virtual ~BuildDocksStationWindow()
|
||||
{
|
||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||
CloseWindowById(WC_SELECT_STATION, 0);
|
||||
}
|
||||
|
||||
void OnPaint() override
|
||||
|
Reference in New Issue
Block a user