-
Notifications
You must be signed in to change notification settings - Fork 503
Add new event for os window #6049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
So I don't mind having this as a feature (assuming you change the API so the request takes a proper cancellation opportunity), but this PR isn't necessary to implement your content feature. |
I'm not sure if I should pass through the |
/// <summary> | ||
/// Raised when the user clicks the close button on the window. Can be canceled! | ||
/// </summary> | ||
public event Action<CancelEventArgs>? RequestClosed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this a new event type.
Needed for space-wizards/space-station-14#36969
Right now, there isn't a way to listen for when the window is requested to close (E.g someone clicks the X button). This means that you have to listen for ALL closes. In the viewport pr, we want to actually close the window when someone presses the x, but we don't want to close it when they simply pop the window back in (that will close the OS window, but not the viewport window)