Enum ggez_goodies::scene::SceneSwitch
[−]
[src]
pub enum SceneSwitch<C, Ev> { None, Push(Box<Scene<C, Ev>>), Replace(Box<Scene<C, Ev>>), Pop, }
A command to change to a new scene, either by pushign a new one, popping one or replacing the current scene (pop and then push).
Variants
None
Push(Box<Scene<C, Ev>>)
Replace(Box<Scene<C, Ev>>)
Pop
Methods
impl<C, Ev> SceneSwitch<C, Ev>
[src]
pub fn replace<S>(scene: S) -> Self where
S: Scene<C, Ev> + 'static,
[src]
S: Scene<C, Ev> + 'static,
Convenient shortcut function for boxing scenes.
Slightly nicer than writing
SceneSwitch::Replace(Box::new(x))
all the damn time.
pub fn push<S>(scene: S) -> Self where
S: Scene<C, Ev> + 'static,
[src]
S: Scene<C, Ev> + 'static,
Same as replace()
but returns SceneSwitch::Push