Struct dbsdk_rs::gamepad::GamepadState
source · [−]#[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
sourceimpl 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
sourceimpl Clone for GamepadState
impl Clone for GamepadState
sourcefn clone(&self) -> GamepadState
fn clone(&self) -> GamepadState
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Copy for GamepadState
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more