game::info

Trait ContextualActions

Source
pub trait ContextualActions {
    // Required methods
    fn actions(&self, app: &App, id: ID) -> Vec<(Key, String)>;
    fn execute(
        &mut self,
        ctx: &mut EventCtx<'_>,
        app: &mut App,
        id: ID,
        action: String,
        close_panel: &mut bool,
    ) -> Transition<App>;
    fn is_paused(&self) -> bool;
    fn gameplay_mode(&self) -> GameplayMode;
}

Required Methods§

Source

fn actions(&self, app: &App, id: ID) -> Vec<(Key, String)>

Source

fn execute( &mut self, ctx: &mut EventCtx<'_>, app: &mut App, id: ID, action: String, close_panel: &mut bool, ) -> Transition<App>

Source

fn is_paused(&self) -> bool

Source

fn gameplay_mode(&self) -> GameplayMode

Implementors§

Source§

impl ContextualActions for game::debug::Actions

Source§

impl ContextualActions for game::sandbox::Actions