Struct ggez_goodies::input::InputState [] [src]

pub struct InputState<Axes, Buttons> where
    Axes: Hash + Eq + Clone,
    Buttons: Hash + Eq + Clone
{ /* fields omitted */ }

Methods

impl<Axes, Buttons> InputState<Axes, Buttons> where
    Axes: Eq + Hash + Clone,
    Buttons: Eq + Hash + Clone
[src]

[src]

[src]

Updates the logical input state based on the actual physical input state. Should be called in your update() handler. So, it will do things like move the axes and so on.

[src]

This method should get called by your key_down_event handler.

[src]

This method should get called by your key_up_event handler.

[src]

This method should get called by your key_up_event handler.

[src]

[src]

Takes an InputEffect and actually applies it.

[src]

[src]

[src]

[src]

[src]

Returns whether or not the button was pressed this frame, only returning true if the press happened this frame.

Basically, get_button_down() and get_button_up() are level triggers, this and get_button_released() are edge triggered.

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Trait Implementations

impl<Axes: Debug, Buttons: Debug> Debug for InputState<Axes, Buttons> where
    Axes: Hash + Eq + Clone,
    Buttons: Hash + Eq + Clone
[src]

[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl<Axes, Buttons> Send for InputState<Axes, Buttons> where
    Axes: Send,
    Buttons: Send

impl<Axes, Buttons> Sync for InputState<Axes, Buttons> where
    Axes: Sync,
    Buttons: Sync