Skip to content

Conversation

@Arufonsu
Copy link
Contributor

  • 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>
@Arufonsu Arufonsu requested review from a team and WeylonSantana January 17, 2026 18:24
@Arufonsu Arufonsu added the bug Something isn't working label Jan 17, 2026
@Arufonsu Arufonsu changed the title Fix/duplicated exit window fix: duplicated exit window Jan 17, 2026
Comment on lines 57 to 63
Closed += OnWindowClosed;
}

private void OnWindowClosed(Base sender, EventArgs args)
{
// Trigger the cancel handler when window is closed via X button
_handleCancel?.Invoke(this, args);
Copy link
Member

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;
Copy link
Member

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;
Copy link
Member

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);
Copy link
Member

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>
@Arufonsu Arufonsu requested a review from pandinocoder January 31, 2026 23:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants