Enum sdl2_sys::SDL_GameControllerAxis
source · #[repr(i32)]pub enum SDL_GameControllerAxis {
SDL_CONTROLLER_AXIS_INVALID = -1,
SDL_CONTROLLER_AXIS_LEFTX = 0,
SDL_CONTROLLER_AXIS_LEFTY = 1,
SDL_CONTROLLER_AXIS_RIGHTX = 2,
SDL_CONTROLLER_AXIS_RIGHTY = 3,
SDL_CONTROLLER_AXIS_TRIGGERLEFT = 4,
SDL_CONTROLLER_AXIS_TRIGGERRIGHT = 5,
SDL_CONTROLLER_AXIS_MAX = 6,
}
Expand description
The list of axes available from a controller
Thumbstick axis values range from SDL_JOYSTICK_AXIS_MIN to SDL_JOYSTICK_AXIS_MAX, and are centered within ~8000 of zero, though advanced UI will allow users to set or autodetect the dead zone, which varies between controllers.
Trigger axis values range from 0 to SDL_JOYSTICK_AXIS_MAX.
Variants§
SDL_CONTROLLER_AXIS_INVALID = -1
SDL_CONTROLLER_AXIS_LEFTX = 0
SDL_CONTROLLER_AXIS_LEFTY = 1
SDL_CONTROLLER_AXIS_RIGHTX = 2
SDL_CONTROLLER_AXIS_RIGHTY = 3
SDL_CONTROLLER_AXIS_TRIGGERLEFT = 4
SDL_CONTROLLER_AXIS_TRIGGERRIGHT = 5
SDL_CONTROLLER_AXIS_MAX = 6
Trait Implementations§
source§impl Clone for SDL_GameControllerAxis
impl Clone for SDL_GameControllerAxis
source§fn clone(&self) -> SDL_GameControllerAxis
fn clone(&self) -> SDL_GameControllerAxis
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 Hash for SDL_GameControllerAxis
impl Hash for SDL_GameControllerAxis
source§impl PartialEq for SDL_GameControllerAxis
impl PartialEq for SDL_GameControllerAxis
source§fn eq(&self, other: &SDL_GameControllerAxis) -> bool
fn eq(&self, other: &SDL_GameControllerAxis) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SDL_GameControllerAxis
impl Eq for SDL_GameControllerAxis
impl StructuralPartialEq for SDL_GameControllerAxis
Auto Trait Implementations§
impl Freeze for SDL_GameControllerAxis
impl RefUnwindSafe for SDL_GameControllerAxis
impl Send for SDL_GameControllerAxis
impl Sync for SDL_GameControllerAxis
impl Unpin for SDL_GameControllerAxis
impl UnwindSafe for SDL_GameControllerAxis
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