Enum sdl2_sys::SDL_GameControllerAxis
source · [−]#[repr(i32)]
pub enum SDL_GameControllerAxis {
SDL_CONTROLLER_AXIS_INVALID,
SDL_CONTROLLER_AXIS_LEFTX,
SDL_CONTROLLER_AXIS_LEFTY,
SDL_CONTROLLER_AXIS_RIGHTX,
SDL_CONTROLLER_AXIS_RIGHTY,
SDL_CONTROLLER_AXIS_TRIGGERLEFT,
SDL_CONTROLLER_AXIS_TRIGGERRIGHT,
SDL_CONTROLLER_AXIS_MAX,
}
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
SDL_CONTROLLER_AXIS_LEFTX
SDL_CONTROLLER_AXIS_LEFTY
SDL_CONTROLLER_AXIS_RIGHTX
SDL_CONTROLLER_AXIS_RIGHTY
SDL_CONTROLLER_AXIS_TRIGGERLEFT
SDL_CONTROLLER_AXIS_TRIGGERRIGHT
SDL_CONTROLLER_AXIS_MAX
Trait Implementations
sourceimpl Clone for SDL_GameControllerAxis
impl Clone for SDL_GameControllerAxis
sourcefn clone(&self) -> SDL_GameControllerAxis
fn clone(&self) -> SDL_GameControllerAxis
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 more
sourceimpl Debug for SDL_GameControllerAxis
impl Debug for SDL_GameControllerAxis
sourceimpl Hash for SDL_GameControllerAxis
impl Hash for SDL_GameControllerAxis
impl Copy for SDL_GameControllerAxis
impl Eq for SDL_GameControllerAxis
impl StructuralEq for SDL_GameControllerAxis
impl StructuralPartialEq for SDL_GameControllerAxis
Auto Trait Implementations
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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more