-
-
Notifications
You must be signed in to change notification settings - Fork 377
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
Pause menu sets last time acceleration after closing #5646
Pause menu sets last time acceleration after closing #5646
Conversation
I don't think restoring forced time acceleration is in scope for the pause menu. On resuming from pause, the game should attempt to restore the previous time acceleration according to the game's limits, and ignore the "forced" time acceleration set by the player. Consider for example a player who hits the ESC key out of desperation because they are about to crash into a planet during forced time acceleration; they would not be able to resume a "safe" time acceleration out of the pause menu due to the need to close the menu and then click on a time acceleration button. While your code currently addresses this correctly, the ability to Ctrl+Click the "close" button to restore time acceleration is very non-obvious to the player, and I think is better handled by simply allowing the player to Ctrl+Click the time acceleration buttons after resuming gameplay to select their desired time acceleration override, rather than attempting to "intelligently" determine when to break the game's self-imposed limits. |
@Web-eWorks The original plan was to |
288efb5
to
dea4310
Compare
Not directly related to this PR, but I had a thought when reading the discussion: |
dea4310
to
e0e9284
Compare
The pause menu now sets the last time acceleration that was before it was opened. Its behavior will be the same as when setting up time acceleration without pressing CTRL. Added two events onPauseMenuClosed and onPauseMenuOpen that will set input binding and last time acceleration.
e0e9284
to
881c58a
Compare
Found some oversight. If the game was already paused,
Still works fine, but
Also, when you press |
|
I've only skimmed the above post-merge comment, but if there's (potential) bug / "fix-me", that needs to be documented, I'd advice to either open an issue, or push a fix-me comment to the code. (This issue tracker is filled with "roger that, I'll fix it shortly", then a decade passes. Which is not a criticism, I just prefer to have TO-DOs documented somewhere so they don't get lost, especially a comment in a merged PR). |
Done some rewrite on my computer. Grouped |
No worries, sometimes subtle issues like this sneak past the first round of PR review and testing. Feel free to open another PR with the fixes. |
The pause menu now sets the last time acceleration that was before it was opened. Its behavior will be the same as when setting up time acceleration without pressing
CTRL
.Added two events
onPauseMenuClosed
andonPauseMenuOpen
that will set input binding and last time acceleration.Edit:
Pause.menu.sets.last.time.acceleration.mp4