Trait cogs_gamedev::controls::InputHandler [−][src]
pub trait InputHandler<I: Hash + Eq + PartialEq + Clone, C: Enum<u32> + Clone> { fn pressed(&self, control: C) -> bool; fn released(&self, control: C) -> bool; fn clicked_down(&self, control: C) -> bool; }
Expand description
The InputHandler trait, makng sure that both styles of input handling expose the same API.
Required methods
Is this input pressed down? i.e. is the player pressing the button?
Is this input released? i.e. is the player not pressing the button?
fn clicked_down(&self, control: C) -> bool
[src]
fn clicked_down(&self, control: C) -> bool
[src]Is this input being clicked down? i.e. was it up last frame, but down this frame?
Implementors
impl<I: Hash + Eq + PartialEq + Clone, C: Enum<u32> + Clone> InputHandler<I, C> for PollingInputHandler<I, C>
[src]
impl<I: Hash + Eq + PartialEq + Clone, C: Enum<u32> + Clone> InputHandler<I, C> for PollingInputHandler<I, C>
[src]Is this input pressed down? i.e. is the player pressing the button?
Is this input released? i.e. is the player not pressing the button?
Is this input being clicked down? i.e. was it up last frame, but down this frame?
Is this input pressed down? i.e. is the player pressing the button?
Is this input released? i.e. is the player not pressing the button?
Is this input being clicked down? i.e. was it up last frame, but down this frame?