Function poke_a_mango::ops::state::press_exit
[−]
[src]
pub fn press_exit(s: &mut GameState)
Press the Exit button in MainMenu
, transforming it into Exit
.
If the supplied argument is not MainMenu
, it remains unchanged.
Examples
let mut state = GameState::MainMenu; if exit_button_pressed { state::press_exit(&mut state); // Then probably close the window }