-
Notifications
You must be signed in to change notification settings - Fork 381
fix: duplicated exit window #2802
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: main
Are you sure you want to change the base?
Conversation
Arufonsu
commented
Jan 17, 2026
- fixes duplication of exit confirmation window behavior across the game client
Signed-off-by: Arufonsu <17498701+Arufonsu@users.noreply.github.com>
Signed-off-by: Arufonsu <17498701+Arufonsu@users.noreply.github.com>
| Closed += OnWindowClosed; | ||
| } | ||
|
|
||
| private void OnWindowClosed(Base sender, EventArgs args) | ||
| { | ||
| // Trigger the cancel handler when window is closed via X button | ||
| _handleCancel?.Invoke(this, args); |
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.
This should be in InputBox
| userData: userData | ||
| ) | ||
| { | ||
| _handleCancel = handleCancel; |
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.
Not needed
| public class AlertWindow : InputBox | ||
| { | ||
| private static readonly HashSet<AlertWindow> _instances = []; | ||
| private readonly GwenEventHandler<EventArgs>? _handleCancel; |
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.
Not needed. If this was done in InputBox (where it belongs), Cancelled can and should already be emitted from there
| private void OnWindowClosed(Base sender, EventArgs args) | ||
| { | ||
| // Trigger the cancel handler when window is closed via X button | ||
| _handleCancel?.Invoke(this, args); |
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.
This would be invoking Cancelled from InputBox
(tested: working as intended) Signed-off-by: Arufonsu <17498701+Arufonsu@users.noreply.github.com>