pub struct GameHooks<G: GameData> {
pub first_key: Option<ScreenHook<G>>,
pub debug: Option<ScreenHook<G>>,
pub debug_screens: &'static [&'static str],
}Expand description
Where the game has a say in the frame loop. Default has none.
Fields§
§first_key: Option<ScreenHook<G>>What the first key press opens while no layout is chosen, on a platform with a keyboard (a layout picker): it opens over whatever shows, and the key does nothing else. Never while a screen of its name is open.
debug: Option<ScreenHook<G>>What the Debug action (UiAction::Debug) opens with debug tools
on (Ctx::debug_tools), unless the top screen is one of
debug_screens.
debug_screens: &'static [&'static str]The debug tools’ screens, over which the Debug action does nothing.
Trait Implementations§
Auto Trait Implementations§
impl<G> Freeze for GameHooks<G>
impl<G> RefUnwindSafe for GameHooks<G>
impl<G> Send for GameHooks<G>
impl<G> Sync for GameHooks<G>
impl<G> Unpin for GameHooks<G>
impl<G> UnsafeUnpin for GameHooks<G>
impl<G> UnwindSafe for GameHooks<G>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more