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
@@ -419,7 +419,7 @@ struct BuildRailToolbarWindow : Window {
|
||||
if (_settings_client.gui.link_terraform_toolbar) ShowTerraformToolbar(this);
|
||||
}
|
||||
|
||||
void Close() override
|
||||
void Close([[maybe_unused]] int data = 0) override
|
||||
{
|
||||
if (this->IsWidgetLowered(WID_RAT_BUILD_STATION)) SetViewportCatchmentStation(nullptr, true);
|
||||
if (this->IsWidgetLowered(WID_RAT_BUILD_WAYPOINT)) SetViewportCatchmentWaypoint(nullptr, true);
|
||||
@@ -1031,7 +1031,7 @@ public:
|
||||
this->InvalidateData();
|
||||
}
|
||||
|
||||
void Close() override
|
||||
void Close([[maybe_unused]] int data = 0) override
|
||||
{
|
||||
CloseWindowById(WC_SELECT_STATION, 0);
|
||||
this->PickerWindowBase::Close();
|
||||
@@ -1694,7 +1694,7 @@ public:
|
||||
this->OnInvalidateData();
|
||||
}
|
||||
|
||||
void Close() override
|
||||
void Close([[maybe_unused]] int data = 0) override
|
||||
{
|
||||
_convert_signal_button = false;
|
||||
this->PickerWindowBase::Close();
|
||||
@@ -2018,7 +2018,7 @@ struct BuildRailWaypointWindow : PickerWindowBase {
|
||||
this->BuildPickerList();
|
||||
}
|
||||
|
||||
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