generated from GarandPLG/rust-flake-template
Add popup toggle to settings view
Introduce `show_popup` flag in SettingsState, toggle it with the Space key, and render a yellow test popup in the settings view when the flag is true.
This commit is contained in:
@@ -10,6 +10,10 @@ pub fn settings_keybindings(app: &mut App, key_event: &KeyEvent) {
|
||||
Action::Quit => app.exit = true,
|
||||
Action::Quit2 => app.exit = true,
|
||||
Action::Esc => app.view = View::MainMenu,
|
||||
Action::Space => {
|
||||
app.game_states.settings_state.show_popup =
|
||||
!app.game_states.settings_state.show_popup
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user