Enum glfw::GamepadButton
source · #[repr(i32)]pub enum GamepadButton {
Show 15 variants
ButtonA = 0,
ButtonB = 1,
ButtonX = 2,
ButtonY = 3,
ButtonLeftBumper = 4,
ButtonRightBumper = 5,
ButtonBack = 6,
ButtonStart = 7,
ButtonGuide = 8,
ButtonLeftThumb = 9,
ButtonRightThumb = 10,
ButtonDpadUp = 11,
ButtonDpadRight = 12,
ButtonDpadDown = 13,
ButtonDpadLeft = 14,
}
Expand description
Button identifier tokens.
Variants§
ButtonA = 0
ButtonB = 1
ButtonX = 2
ButtonY = 3
ButtonLeftBumper = 4
ButtonRightBumper = 5
ButtonBack = 6
ButtonStart = 7
ButtonGuide = 8
ButtonLeftThumb = 9
ButtonRightThumb = 10
ButtonDpadUp = 11
ButtonDpadRight = 12
ButtonDpadDown = 13
ButtonDpadLeft = 14
Implementations§
source§impl GamepadButton
impl GamepadButton
sourcepub fn from_i32(n: i32) -> Option<GamepadButton>
pub fn from_i32(n: i32) -> Option<GamepadButton>
Converts from i32
.
Trait Implementations§
source§impl Clone for GamepadButton
impl Clone for GamepadButton
source§fn clone(&self) -> GamepadButton
fn clone(&self) -> GamepadButton
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 Debug for GamepadButton
impl Debug for GamepadButton
source§impl Hash for GamepadButton
impl Hash for GamepadButton
source§impl Ord for GamepadButton
impl Ord for GamepadButton
source§fn cmp(&self, other: &GamepadButton) -> Ordering
fn cmp(&self, other: &GamepadButton) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for GamepadButton
impl PartialEq for GamepadButton
source§fn eq(&self, other: &GamepadButton) -> bool
fn eq(&self, other: &GamepadButton) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for GamepadButton
impl PartialOrd for GamepadButton
source§fn partial_cmp(&self, other: &GamepadButton) -> Option<Ordering>
fn partial_cmp(&self, other: &GamepadButton) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Copy for GamepadButton
impl Eq for GamepadButton
impl StructuralPartialEq for GamepadButton
Auto Trait Implementations§
impl RefUnwindSafe for GamepadButton
impl Send for GamepadButton
impl Sync for GamepadButton
impl Unpin for GamepadButton
impl UnwindSafe for GamepadButton
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