Add: data parameter in Window::Close method.
This allows passing data when closing a window, e.g. to indicate how it was closed.
This commit is contained in:

committed by
Peter Nelson

parent
cda6f24fe8
commit
f379b31e28
@@ -108,7 +108,7 @@ struct BuildDocksToolbarWindow : Window {
|
||||
if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
|
||||
}
|
||||
|
||||
void Close() override
|
||||
void Close([[maybe_unused]] int data = 0) override
|
||||
{
|
||||
if (_game_mode == GM_NORMAL && this->IsWidgetLowered(WID_DT_STATION)) SetViewportCatchmentStation(nullptr, true);
|
||||
if (_settings_client.gui.link_terraform_toolbar) CloseWindowById(WC_SCEN_LAND_GEN, 0, false);
|
||||
@@ -422,7 +422,7 @@ public:
|
||||
this->LowerWidget(_settings_client.gui.station_show_coverage + BDSW_LT_OFF);
|
||||
}
|
||||
|
||||
void Close() override
|
||||
void Close([[maybe_unused]] int data = 0) override
|
||||
{
|
||||
CloseWindowById(WC_SELECT_STATION, 0);
|
||||
this->PickerWindowBase::Close();
|
||||
|
Reference in New Issue
Block a user