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
@@ -1325,7 +1325,7 @@ struct StationViewWindow : public Window {
|
||||
this->owner = Station::Get(window_number)->owner;
|
||||
}
|
||||
|
||||
void Close() override
|
||||
void Close([[maybe_unused]] int data = 0) override
|
||||
{
|
||||
CloseWindowById(WC_TRAINS_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_TRAIN, this->owner, this->window_number).Pack(), false);
|
||||
CloseWindowById(WC_ROADVEH_LIST, VehicleListIdentifier(VL_STATION_LIST, VEH_ROAD, this->owner, this->window_number).Pack(), false);
|
||||
@@ -2287,7 +2287,7 @@ struct SelectStationWindow : Window {
|
||||
_thd.freeze = true;
|
||||
}
|
||||
|
||||
void Close() override
|
||||
void Close([[maybe_unused]] int data = 0) override
|
||||
{
|
||||
SetViewportCatchmentSpecializedStation<T>(nullptr, true);
|
||||
|
||||
|
Reference in New Issue
Block a user