enhancement: confirmation dialogues when closing the client#2788
Merged
WeylonSantana merged 1 commit intomainfrom Dec 27, 2025
Merged
enhancement: confirmation dialogues when closing the client#2788WeylonSantana merged 1 commit intomainfrom
WeylonSantana merged 1 commit intomainfrom
Conversation
This commit restores original engine behavior that prevents accidental game exits and ensures players don't lose progress by accidentally pressing Alt+F4 or clicking the window close button, especially during combat situations. - Intercept OnExiting event to prevent immediate closure when player is in-game - Show combat warning dialog if player is in combat, requiring confirmation to exit - Show standard quit confirmation dialog if player is not in combat - Add _isShowingExitConfirmation flag to prevent infinite OnExiting event loop - Makes InputBox.Closed event to handle X button clicks on dialogs - Add QuitTitle and QuitPrompt strings to General localization - Normal cleanup continues if player is not logged in or not in-game - replicated this logic for both, simplified and regular game menus when pressing the desktop option
WeylonSantana
approved these changes
Dec 27, 2025
Arufonsu
added a commit
that referenced
this pull request
Dec 27, 2025
(PR #2788 was not finished) This Commit finishes the job and fixes #2762 as well - No more SDL hack for Linux, args.Cancel = true should be sufficient for all platforms (MonoGame). - Improved logic working for: simplified and regular game menus desktop/logout buttons, Alt+F4 and X close button - Improved logic works either in game and mainmenu
Arufonsu
added a commit
that referenced
this pull request
Dec 27, 2025
(PR #2788 was not finished) This Commit finishes the job and fixes #2762 as well - No more SDL hack for Linux, args.Cancel = true should be sufficient for all platforms (MonoGame). - Improved logic working for: simplified and regular game menus desktop/logout buttons, Alt+F4 and X close button - Improved logic works either in game and mainmenu
Arufonsu
added a commit
that referenced
this pull request
Dec 27, 2025
(PR #2788 was not finished) This Commit finishes the job and fixes #2762 as well - No more SDL hack for Linux, args.Cancel = true should be sufficient for all platforms (MonoGame). - Improved logic working for: simplified and regular game menus desktop/logout buttons, Alt+F4 and X close button - Improved logic works either in game and mainmenu
Arufonsu
added a commit
that referenced
this pull request
Dec 27, 2025
(PR #2788 was not finished) This Commit finishes the job and fixes #2762 as well - No more SDL hack for Linux, args.Cancel = true should be sufficient for all platforms (MonoGame). - Improved logic working for: simplified and regular game menus desktop/logout buttons, Alt+F4 and X close button - Improved logic works either in game and mainmenu - Prevents game crash due to disposal of already disposed UI elements
WeylonSantana
pushed a commit
that referenced
this pull request
Dec 27, 2025
(PR #2788 was not finished) This Commit finishes the job and fixes #2762 as well - No more SDL hack for Linux, args.Cancel = true should be sufficient for all platforms (MonoGame). - Improved logic working for: simplified and regular game menus desktop/logout buttons, Alt+F4 and X close button - Improved logic works either in game and mainmenu - Prevents game crash due to disposal of already disposed UI elements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit restores some of the original engine behavior that prevented accidental game exits and ensures players don't lose progress by accidentally pressing Alt+F4 or clicking the window close button, especially during combat situations.
While not in combat - (press either Alt+F4 or the X window close button)

While in combat - (press either Alt+F4 or the X window close button)

While not in combat - (from game menu / simplified menu desktop button)

While in combat - (from game menu / simplified menu desktop button) (not changed at all)
