Trait tic80::GamePadTrait

source ·
pub trait GamePadTrait {
    // Required methods
    fn buttons(&self) -> GamePadButtons;
    fn button_idx(&self, b: Button) -> ButtonIdx;

    // Provided methods
    fn all_pressed(&self, buttons: GamePadButtons) -> bool { ... }
    fn any_pressed(&self, buttons: GamePadButtons) -> bool { ... }
    fn is_any_pressed(&self) -> bool { ... }
    fn just_pressed(
        &mut self,
        b: Button,
        hold: Option<Ticks>,
        period: Option<Ticks>
    ) -> bool { ... }
}

Required Methods§

Provided Methods§

source

fn all_pressed(&self, buttons: GamePadButtons) -> bool

source

fn any_pressed(&self, buttons: GamePadButtons) -> bool

source

fn is_any_pressed(&self) -> bool

source

fn just_pressed( &mut self, b: Button, hold: Option<Ticks>, period: Option<Ticks> ) -> bool

Implementors§

source§

impl GamePadTrait for GamePadEnum

source§

impl<const PLAYER: u8> GamePadTrait for GamePad<PLAYER>