Struct gilrs::ev::state::GamepadState [−][src]
pub struct GamepadState { /* fields omitted */ }
Expand description
Cached gamepad state.
Implementations
Returns true
if given button is pressed. Returns false
if there is no information about
btn
or it is not pressed.
Returns value of el
or 0.0 when there is no information about it. el
can be either axis
or button.
Iterate over buttons data.
pub fn axes(&self) -> AxisDataIter<'_>ⓘNotable traits for AxisDataIter<'a>impl<'a> Iterator for AxisDataIter<'a> type Item = (Code, &'a AxisData);
pub fn axes(&self) -> AxisDataIter<'_>ⓘNotable traits for AxisDataIter<'a>impl<'a> Iterator for AxisDataIter<'a> type Item = (Code, &'a AxisData);
Notable traits for AxisDataIter<'a>
impl<'a> Iterator for AxisDataIter<'a> type Item = (Code, &'a AxisData);
Iterate over axes data.
Returns button state and when it changed.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GamepadState
impl Send for GamepadState
impl Sync for GamepadState
impl Unpin for GamepadState
impl UnwindSafe for GamepadState
Blanket Implementations
Mutably borrows from an owned value. Read more