Repository navigation
In-Game Menu Enhancements - #1139
Open
zack-the-coding-actuary wants to merge 5 commits into
Open
zack-the-coding-actuary wants to merge 5 commits into
zack-the-coding-actuary wants to merge 5 commits into
Conversation
- Add "New Game (Ctrl-Shift-Q)" button below Load Game and above Preferences in the in-game main menu - Add confirmation popup before leaving the current game, matching the Retire workflow - Add Game.OnNewGame, which returns to the main entry screen after the player confirms - Add new_game input action and C7Action.NewGame for the Ctrl-Shift-Q shortcut - Enable the previously stubbed New Game button in GameMenu and add a NewGame signal on PopupOverlay
- Remove duplicate Ctrl-P handling from HandleKeyboardInput, which toggled Preferences open and then the open_preferences action handler toggled it closed again in the same frame - Keep the open_preferences action handler as the single entry point, consistent with the Save, Load, and Retire shortcuts - Only open Preferences when no other modal is visible, so it can no longer open on top of the city screen or advisors
- Add "We are disgraced!" popup after confirming Retire, showing time spent, before returning to the main menu - Add GameData.timePlayedSeconds, accumulated by the UI each frame, so the engine state stays deterministic for headless tests - Serialize time played in SaveGame as TimePlayedSeconds; older saves without the field default to 0 - Add SaveTest covering the time played save and load round trip - Update Retire TODOs now that only the end-of-game score graphs remain
…sizing - Ignore key-repeat Enter events in the interactable popup controller so a held Enter can't also confirm the next popup - Add an optional onConfirm callback to InformationPopup so the "We are disgraced!" popup returns to the main menu directly instead of waiting on a UI message that is sent twice per confirmation - Show the "We are disgraced!" popup from the Game Over popup's "Return to the main menu" option, not only from Retire - Add a TODO on the victory popup for the victory screen and end-of-game score graphs - Redraw the popup background when its content resizes so late text wrapping no longer leaves the confirm button hanging below the box - Add a disallowEscape option for interactable popups and use it on the disgrace and Game Over popups so Esc can't skip their actions
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.
Added a few minor QoL updates to how players interact with the in-game menu:
Follow Up TODOs after merging (or as a part of this PR):
HistTurnRecordto create the usual histogram graphic that pops up on game end after exiting via Retire, Defeat, or Victory.