Function poke_a_mango::ops::state::press_back
[−]
[src]
pub fn press_back(s: &mut GameState)
Press the Back button in ChooseDifficulty
, GameOver
or DisplayLeaderboard
, transforming them into MainMenu
.
If the supplied argument is not ChooseDifficulty
, GameOver
or DisplayLeaderboard
, it remains unchanged.
Examples
let mut state = GameState::ChooseDifficulty; if back_button_pressed { state::press_back(&mut state); }