Skip to content

UI Overhaul #11

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

Merged
merged 16 commits into from
Mar 22, 2025
Merged

UI Overhaul #11

merged 16 commits into from
Mar 22, 2025

Conversation

ybettles
Copy link
Collaborator

@ybettles ybettles commented Mar 16, 2025

A complete UI overhaul:

  • Added splash screen, which the game loads into before the main menu (currently player still loads in here but that will be fixed later)
    image
  • Moved the main menu, pause, and splash plugins into a module called ui
    • helpfully, we can now include UI by just using the UIPlugin
  • Made some helpful structs with pre-made things like buttons and menu containers, so implementing new pieces of menu UI is way simpler and less verbose
  • Added a Quit to Title button to the Pause menu
    image
  • Figured out what was up with my button colors, so we have nice green buttons now
  • Sorted out centralising the logic that listens for press of Esc so that we aren't repeating the same listener code everywhere (and it's easier to maintain bc it's in one place instead of like six)
  • Made the menus have grey translucent background to make it clearer when the game is paused that the entities in the background will not be interactive while paused (see second screenshot)
  • Documented the heck out of it all so hopefully it is easier to use and understand

✨ woohooooo! :))

@ybettles ybettles requested a review from signal32 March 16, 2025 17:46
@ybettles
Copy link
Collaborator Author

Realising that "Quit to Title" doesn't work quite as intended because it implies ending the current game, which it currently does not do. I think I need to add a GameState::End state or something, so that it can transition into that, do some cleanup (involves tagging things with OnGameScreen in order to do that), and then return to the main menu. Then on entering GameState::Game after that, we'd need to perform some checks for whether stuff already exists, (maybe we have some resource that has a boolean to reflect whether or not there is a game in progress already?) and if it doesn't, it sets up the playing field with a new game setup. (Kinda just thinking out loud but seemed sensible to write it down lol)

Copy link
Owner

@signal32 signal32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg this is amazing!!! its so neat and organized now! ive even learned about a few new rust things and seen some genuinely cool new approaches to solving problems i would not have thought of before :))
left a bunch of comments but am genuinely very happy with this even as is ✨

@ybettles ybettles merged commit 1c8fb54 into main Mar 22, 2025
@ybettles ybettles deleted the menu-tweaks branch March 22, 2025 08:47
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.

2 participants