pub enum ControllerButton {
Show 15 variants
A,
B,
X,
Y,
DPadDown,
DPadLeft,
DPadRight,
DPadUp,
LeftShoulder,
RightShoulder,
LeftStick,
RightStick,
Back,
Start,
Guide,
}Expand description
Controller buttons matching SDL controller model
Variants§
A
The A button, typically the lower button in the “diamond” of buttons on the right side of the controller.
B
The B button, typically the right button in the “diamond” of buttons on the right side of the controller.
X
The X button, typically the left button in the “diamond” of buttons on the right side of the controller.
Y
The Y button, typically the top button in the “diamond” of buttons on the right side of the controller.
DPadDown
The dpad button pointed towards the player
DPadLeft
The dpad button pointed to the player’s left
DPadRight
The dpad button pointed to the player’s right
DPadUp
The dpad button pointed away from the player.
LeftShoulder
The digital left shoulder bumper. Usually located above the left trigger.
RightShoulder
The digital right shoulder bumper. Usually located above the right trigger.
LeftStick
If your press the left analog stick into the controller this button is pressed.
RightStick
If your press the right analog stick into the controller this button is pressed.
Back
The back button is typically a button slightly left of center with a leftward arrow on it.
Start
The start button is typically a button slightly right of center with a rightward arrow on it.
Guide
The centermost button on the controller. Large and green on an Xbox controller.
Trait Implementations§
Source§impl Clone for ControllerButton
impl Clone for ControllerButton
Source§fn clone(&self) -> ControllerButton
fn clone(&self) -> ControllerButton
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ControllerButton
impl Debug for ControllerButton
Source§impl<'de> Deserialize<'de> for ControllerButton
impl<'de> Deserialize<'de> for ControllerButton
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Hash for ControllerButton
impl Hash for ControllerButton
Source§impl PartialEq for ControllerButton
impl PartialEq for ControllerButton
Source§impl Serialize for ControllerButton
impl Serialize for ControllerButton
impl Copy for ControllerButton
impl Eq for ControllerButton
impl StructuralPartialEq for ControllerButton
Auto Trait Implementations§
impl Freeze for ControllerButton
impl RefUnwindSafe for ControllerButton
impl Send for ControllerButton
impl Sync for ControllerButton
impl Unpin for ControllerButton
impl UnsafeUnpin for ControllerButton
impl UnwindSafe for ControllerButton
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Config for Twhere
T: for<'a> Deserialize<'a> + Serialize,
impl<T> Config for Twhere
T: for<'a> Deserialize<'a> + Serialize,
Source§fn load<P>(path: P) -> Result<T, ConfigError>
fn load<P>(path: P) -> Result<T, ConfigError>
Source§fn load_bytes(bytes: &[u8]) -> Result<T, ConfigError>
fn load_bytes(bytes: &[u8]) -> Result<T, ConfigError>
Source§fn write<P>(&self, path: P) -> Result<(), ConfigError>
fn write<P>(&self, path: P) -> Result<(), ConfigError>
Source§fn load_no_fallback<P>(path: P) -> Result<Self, ConfigError>
fn load_no_fallback<P>(path: P) -> Result<Self, ConfigError>
use load instead
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>
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>
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SetParameter for T
impl<T> SetParameter for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.