Skip to content

Conversation

benfrankel
Copy link
Collaborator

@benfrankel benfrankel commented May 24, 2025

Relates to #206.

NOTES:

  • This PR only adds the menu without actually pausing gameplay.
  • This PR doesn't add a translucent pause overlay.
  • I hard-coded the "go back" feature, which would be better implemented with a state stack.
  • I can't write "upon exiting any screen, close the current menu" using bevy_state because there is no state pattern-matching, so this is hard-coded as well. (well I can, but it wouldn't be simple enough for this template)
  • There are probably 1-frame delays between entering a Screen and opening / closing the relevant Menu, because I can't do dependent states in bevy_state (aka require state transitions of Menu to run .after state transitions of Screen so that the latter can control the former on transition within the same frame).

2025-05-23_1748051220_1920x1038

2025-05-23_1748051200_1920x1038

@benfrankel benfrankel enabled auto-merge (squash) May 24, 2025 02:23
@benfrankel benfrankel changed the base branch from main to pause May 24, 2025 03:07
@benfrankel benfrankel disabled auto-merge May 24, 2025 03:07
@benfrankel benfrankel merged commit cbf2974 into TheBevyFlock:pause May 26, 2025
@benfrankel benfrankel deleted the pause branch May 26, 2025 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants