#[repr(C)]pub struct GLFWgamepadstate {
pub buttons: [u8; 15],
pub axes: [f32; 6],
}Expand description
@brief Gamepad input state
This describes the input state of a gamepad.
@sa @ref gamepad @sa @ref glfwGetGamepadState
@since Added in version 3.3.
@ingroup input
Fields§
The states of each [gamepad button](@ref gamepad_buttons), GLFW_PRESS
or GLFW_RELEASE.
axes: [f32; 6]The states of each [gamepad axis](@ref gamepad_axes), in the range -1.0 to 1.0 inclusive.
Trait Implementations§
Source§impl Clone for GLFWgamepadstate
impl Clone for GLFWgamepadstate
Source§fn clone(&self) -> GLFWgamepadstate
fn clone(&self) -> GLFWgamepadstate
Returns a duplicate 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 GLFWgamepadstate
impl Debug for GLFWgamepadstate
Source§impl From<GLFWgamepadstate> for GamepadState
impl From<GLFWgamepadstate> for GamepadState
Source§fn from(state: GLFWgamepadstate) -> Self
fn from(state: GLFWgamepadstate) -> Self
Converts to this type from the input type.
impl Copy for GLFWgamepadstate
Auto Trait Implementations§
impl Freeze for GLFWgamepadstate
impl RefUnwindSafe for GLFWgamepadstate
impl Send for GLFWgamepadstate
impl Sync for GLFWgamepadstate
impl Unpin for GLFWgamepadstate
impl UnwindSafe for GLFWgamepadstate
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more