Rename close window functions to match upstream
This commit is contained in:
@@ -349,7 +349,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);
|
||||
@@ -519,8 +519,8 @@ struct BuildRailToolbarWindow : Window {
|
||||
{
|
||||
if (this->IsWidgetLowered(WID_RAT_BUILD_STATION)) SetViewportCatchmentStation(nullptr, true);
|
||||
if (this->IsWidgetLowered(WID_RAT_BUILD_WAYPOINT)) SetViewportCatchmentWaypoint(nullptr, true);
|
||||
if (_settings_client.gui.link_terraform_toolbar) DeleteWindowById(WC_SCEN_LAND_GEN, 0, false);
|
||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||
if (_settings_client.gui.link_terraform_toolbar) CloseWindowById(WC_SCEN_LAND_GEN, 0, false);
|
||||
CloseWindowById(WC_SELECT_STATION, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -930,12 +930,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
|
||||
@@ -1064,7 +1064,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);
|
||||
@@ -1251,7 +1251,7 @@ public:
|
||||
|
||||
virtual ~BuildRailStationWindow()
|
||||
{
|
||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||
CloseWindowById(WC_SELECT_STATION, 0);
|
||||
}
|
||||
|
||||
/** Sort station classes by StationClassID. */
|
||||
@@ -1549,7 +1549,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:
|
||||
@@ -1581,7 +1581,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;
|
||||
}
|
||||
|
||||
@@ -1614,7 +1614,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;
|
||||
}
|
||||
|
||||
@@ -1648,7 +1648,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;
|
||||
}
|
||||
|
||||
@@ -1670,7 +1670,7 @@ public:
|
||||
this->SelectClass(station_class_id);
|
||||
if (_settings_client.sound.click_beep) SndPlayFx(SND_15_BEEP);
|
||||
this->SetDirty();
|
||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||
CloseWindowById(WC_SELECT_STATION, 0);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1689,7 +1689,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;
|
||||
}
|
||||
}
|
||||
@@ -2518,7 +2518,7 @@ struct BuildRailWaypointWindow : PickerWindowBase {
|
||||
|
||||
virtual ~BuildRailWaypointWindow()
|
||||
{
|
||||
DeleteWindowById(WC_SELECT_STATION, 0);
|
||||
CloseWindowById(WC_SELECT_STATION, 0);
|
||||
}
|
||||
|
||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
|
Reference in New Issue
Block a user