-
Notifications
You must be signed in to change notification settings - Fork 0
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
Main menu UI #16
Merged
Merged
Main menu UI #16
Conversation
This file contains 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
* made debug.rs only be imported when the feature flag is enabled * moved `add_loaded_component` into utils.rs from game.rs * change the default plugin setup (e.g. in the so-far unused polar.rs) * added a ui.rs with a `GalaxyUIPlugin` * added a ui folder and main_menu.rs file, with a `GalaxyMainMenuPlugin` within * added a parent node for `GalaxyMainMenuPlugin` * changed add_loaded_component to be in the `PreUpdate` stage rather than the `Update` stage
* add the UI nodes for basic main menu buttons * prepare future ui icons for use by adding them to the asset struct * changed default clear colour * fix log plugin cfg flag * remove "add_loaded_component" in favour of doing it manually, to prevent possible issues
* add the first proper TDD test, for main_menu_button_system (admittedly after making the function, but is a good POC) * renanme MainButton to MainMenuButton and covert it into an enum (replacing MainButtonType)
* cleaned `game.rs` + added the GameState to the plugin * renamed `state.rs` to `states.rs` * removed an ugly format from `ui.rs` * added `slkscre.ttf` font, used it in `main_menu.rs` for the buttons * inited a settings.rs file
Sycrosity
added a commit
that referenced
this pull request
Sep 1, 2023
* run cargo clippy --fix * Code refactoring and UI initialisation * made debug.rs only be imported when the feature flag is enabled * moved `add_loaded_component` into utils.rs from game.rs * change the default plugin setup (e.g. in the so-far unused polar.rs) * added a ui.rs with a `GalaxyUIPlugin` * added a ui folder and main_menu.rs file, with a `GalaxyMainMenuPlugin` within * added a parent node for `GalaxyMainMenuPlugin` * changed add_loaded_component to be in the `PreUpdate` stage rather than the `Update` stage * add aesprite files to .gitignore * add new item to bacon config * add a basic main menu ui setup * add the UI nodes for basic main menu buttons * prepare future ui icons for use by adding them to the asset struct * changed default clear colour * fix log plugin cfg flag * remove "add_loaded_component" in favour of doing it manually, to prevent possible issues * added functionality to main menu buttons * TDD: added main_menu_button_test * add the first proper TDD test, for main_menu_button_system (admittedly after making the function, but is a good POC) * renanme MainButton to MainMenuButton and covert it into an enum (replacing MainButtonType) * added a suitable font + cleanup * cleaned `game.rs` + added the GameState to the plugin * renamed `state.rs` to `states.rs` * removed an ugly format from `ui.rs` * added `slkscre.ttf` font, used it in `main_menu.rs` for the buttons * inited a settings.rs file * replace the main_menu_button fn with a closure * trying TDD - main_menu_button_system update * it helps if your tests are correct... * satisfy the test (and noted hover oversight) * undo the newest change in the test * revert the change by following the test - TDD works! * add some `Name` components to some UI nodes
Sycrosity
added a commit
that referenced
this pull request
Sep 1, 2023
* run cargo clippy --fix * Code refactoring and UI initialisation * made debug.rs only be imported when the feature flag is enabled * moved `add_loaded_component` into utils.rs from game.rs * change the default plugin setup (e.g. in the so-far unused polar.rs) * added a ui.rs with a `GalaxyUIPlugin` * added a ui folder and main_menu.rs file, with a `GalaxyMainMenuPlugin` within * added a parent node for `GalaxyMainMenuPlugin` * changed add_loaded_component to be in the `PreUpdate` stage rather than the `Update` stage * add aesprite files to .gitignore * add new item to bacon config * add a basic main menu ui setup * add the UI nodes for basic main menu buttons * prepare future ui icons for use by adding them to the asset struct * changed default clear colour * fix log plugin cfg flag * remove "add_loaded_component" in favour of doing it manually, to prevent possible issues * added functionality to main menu buttons * TDD: added main_menu_button_test * add the first proper TDD test, for main_menu_button_system (admittedly after making the function, but is a good POC) * renanme MainButton to MainMenuButton and covert it into an enum (replacing MainButtonType) * added a suitable font + cleanup * cleaned `game.rs` + added the GameState to the plugin * renamed `state.rs` to `states.rs` * removed an ugly format from `ui.rs` * added `slkscre.ttf` font, used it in `main_menu.rs` for the buttons * inited a settings.rs file * replace the main_menu_button fn with a closure * trying TDD - main_menu_button_system update * it helps if your tests are correct... * satisfy the test (and noted hover oversight) * undo the newest change in the test * revert the change by following the test - TDD works! * add some `Name` components to some UI nodes
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.
No description provided.