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