#[repr(C)]pub struct GamepadState {
pub button_mask: GamepadButtonMask,
pub left_stick_x: i16,
pub left_stick_y: i16,
pub right_stick_x: i16,
pub right_stick_y: i16,
}
Fields§
§left_stick_x: i16
§left_stick_y: i16
§right_stick_x: i16
§right_stick_y: i16
Implementations§
Source§impl GamepadState
impl GamepadState
Sourcepub fn is_pressed(self, button: GamepadButton) -> bool
pub fn is_pressed(self, button: GamepadButton) -> bool
Check if the given button is pressed
Trait Implementations§
Source§impl Clone for GamepadState
impl Clone for GamepadState
Source§fn clone(&self) -> GamepadState
fn clone(&self) -> GamepadState
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GamepadState
impl Debug for GamepadState
impl Copy for GamepadState
Auto Trait Implementations§
impl Freeze for GamepadState
impl RefUnwindSafe for GamepadState
impl Send for GamepadState
impl Sync for GamepadState
impl Unpin for GamepadState
impl UnwindSafe for GamepadState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more