Struct gilrs::ev::GamepadState
[−]
[src]
pub struct GamepadState { /* fields omitted */ }
Cached gamepad state.
Methods
impl GamepadState
[src]
fn is_pressed(&self, btn: NativeEvCode) -> bool
[src]
Returns true
if given button is pressed. Returns false
if there is no information about
btn
or it is not pressed.
fn value(&self, axis: NativeEvCode) -> f32
[src]
Returns value of axis or 0.0 when there is no information about axis.
[src]
Iterate over buttons data.
fn axes(&self) -> AxisDataIter
[src]
Iterate over axes data.
[src]
Returns button state and when it changed.
fn axis_data(&self, axis: NativeEvCode) -> Option<&AxisData>
[src]
Returns axis state and when it changed.
Trait Implementations
impl Clone for GamepadState
[src]
fn clone(&self) -> GamepadState
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more