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
@@ -1036,7 +1036,7 @@ struct QueryStringWindow : public Window
|
||||
}
|
||||
}
|
||||
|
||||
void Close() override
|
||||
void Close([[maybe_unused]] int data = 0) override
|
||||
{
|
||||
if (!this->editbox.handled && this->parent != nullptr) {
|
||||
Window *parent = this->parent;
|
||||
@@ -1109,7 +1109,7 @@ struct QueryWindow : public Window {
|
||||
this->FinishInitNested(WN_CONFIRM_POPUP_QUERY);
|
||||
}
|
||||
|
||||
void Close() override
|
||||
void Close([[maybe_unused]] int data = 0) override
|
||||
{
|
||||
if (this->proc != nullptr) this->proc(this->parent, false);
|
||||
this->Window::Close();
|
||||
|
Reference in New Issue
Block a user