#[repr(i32)]pub enum SDL_GameControllerButton {
Show 23 variants
SDL_CONTROLLER_BUTTON_INVALID = -1,
SDL_CONTROLLER_BUTTON_A = 0,
SDL_CONTROLLER_BUTTON_B = 1,
SDL_CONTROLLER_BUTTON_X = 2,
SDL_CONTROLLER_BUTTON_Y = 3,
SDL_CONTROLLER_BUTTON_BACK = 4,
SDL_CONTROLLER_BUTTON_GUIDE = 5,
SDL_CONTROLLER_BUTTON_START = 6,
SDL_CONTROLLER_BUTTON_LEFTSTICK = 7,
SDL_CONTROLLER_BUTTON_RIGHTSTICK = 8,
SDL_CONTROLLER_BUTTON_LEFTSHOULDER = 9,
SDL_CONTROLLER_BUTTON_RIGHTSHOULDER = 10,
SDL_CONTROLLER_BUTTON_DPAD_UP = 11,
SDL_CONTROLLER_BUTTON_DPAD_DOWN = 12,
SDL_CONTROLLER_BUTTON_DPAD_LEFT = 13,
SDL_CONTROLLER_BUTTON_DPAD_RIGHT = 14,
SDL_CONTROLLER_BUTTON_MISC1 = 15,
SDL_CONTROLLER_BUTTON_PADDLE1 = 16,
SDL_CONTROLLER_BUTTON_PADDLE2 = 17,
SDL_CONTROLLER_BUTTON_PADDLE3 = 18,
SDL_CONTROLLER_BUTTON_PADDLE4 = 19,
SDL_CONTROLLER_BUTTON_TOUCHPAD = 20,
SDL_CONTROLLER_BUTTON_MAX = 21,
}
Expand description
The list of buttons available from a controller
Variants§
SDL_CONTROLLER_BUTTON_INVALID = -1
SDL_CONTROLLER_BUTTON_A = 0
SDL_CONTROLLER_BUTTON_B = 1
SDL_CONTROLLER_BUTTON_X = 2
SDL_CONTROLLER_BUTTON_Y = 3
SDL_CONTROLLER_BUTTON_BACK = 4
SDL_CONTROLLER_BUTTON_GUIDE = 5
SDL_CONTROLLER_BUTTON_START = 6
SDL_CONTROLLER_BUTTON_LEFTSTICK = 7
SDL_CONTROLLER_BUTTON_RIGHTSTICK = 8
SDL_CONTROLLER_BUTTON_LEFTSHOULDER = 9
SDL_CONTROLLER_BUTTON_RIGHTSHOULDER = 10
SDL_CONTROLLER_BUTTON_DPAD_UP = 11
SDL_CONTROLLER_BUTTON_DPAD_DOWN = 12
SDL_CONTROLLER_BUTTON_DPAD_LEFT = 13
SDL_CONTROLLER_BUTTON_DPAD_RIGHT = 14
SDL_CONTROLLER_BUTTON_MISC1 = 15
SDL_CONTROLLER_BUTTON_PADDLE1 = 16
SDL_CONTROLLER_BUTTON_PADDLE2 = 17
SDL_CONTROLLER_BUTTON_PADDLE3 = 18
SDL_CONTROLLER_BUTTON_PADDLE4 = 19
SDL_CONTROLLER_BUTTON_TOUCHPAD = 20
SDL_CONTROLLER_BUTTON_MAX = 21
Trait Implementations§
source§impl Clone for SDL_GameControllerButton
impl Clone for SDL_GameControllerButton
source§fn clone(&self) -> SDL_GameControllerButton
fn clone(&self) -> SDL_GameControllerButton
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_GameControllerButton
impl Hash for SDL_GameControllerButton
source§impl PartialEq for SDL_GameControllerButton
impl PartialEq for SDL_GameControllerButton
source§fn eq(&self, other: &SDL_GameControllerButton) -> bool
fn eq(&self, other: &SDL_GameControllerButton) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for SDL_GameControllerButton
impl Eq for SDL_GameControllerButton
impl StructuralPartialEq for SDL_GameControllerButton
Auto Trait Implementations§
impl Freeze for SDL_GameControllerButton
impl RefUnwindSafe for SDL_GameControllerButton
impl Send for SDL_GameControllerButton
impl Sync for SDL_GameControllerButton
impl Unpin for SDL_GameControllerButton
impl UnwindSafe for SDL_GameControllerButton
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