Enum amethyst_input::ControllerButton
source · 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
sourceimpl Clone for ControllerButton
impl Clone for ControllerButton
sourcefn clone(&self) -> ControllerButton
fn clone(&self) -> ControllerButton
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresourceimpl Debug for ControllerButton
impl Debug for ControllerButton
sourceimpl<'de> Deserialize<'de> for ControllerButton
impl<'de> Deserialize<'de> for ControllerButton
sourcefn 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>,
sourceimpl PartialEq<ControllerButton> for ControllerButton
impl PartialEq<ControllerButton> for ControllerButton
sourcefn eq(&self, other: &ControllerButton) -> bool
fn eq(&self, other: &ControllerButton) -> bool
sourceimpl Serialize for ControllerButton
impl Serialize for ControllerButton
impl Copy for ControllerButton
impl Eq for ControllerButton
impl StructuralEq for ControllerButton
impl StructuralPartialEq for ControllerButton
Auto Trait Implementations
impl RefUnwindSafe for ControllerButton
impl Send for ControllerButton
impl Sync for ControllerButton
impl Unpin for ControllerButton
impl UnwindSafe for ControllerButton
Blanket Implementations
impl<T> Any for Twhere
T: Any,
impl<T> Any for Twhere
T: Any,
fn get_type_id(&self) -> TypeId
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read morefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read morefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read morefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more