pub enum GamepadAction {
Sprint,
Jump,
Interact,
}Expand description
A rebindable gamepad action. Movement and look come from the sticks (with the d-pad as a digital movement fallback), so only the button-driven actions are rebindable; pause (Start) carries menu semantics and stays fixed, like Escape on the keyboard.
Variants§
Implementations§
Source§impl GamepadAction
impl GamepadAction
Sourcepub const ALL: [GamepadAction; 3]
pub const ALL: [GamepadAction; 3]
Every rebindable action, in Controls-tab row order.
Sourcepub fn setting_key(self) -> &'static str
pub fn setting_key(self) -> &'static str
The settings key string used in setting:<key>:rebind actions and the
engine settings registry. The pad_ prefix distinguishes a button
capture row from a key_* keyboard capture row.
Sourcepub fn from_setting_key(key: &str) -> Option<GamepadAction>
pub fn from_setting_key(key: &str) -> Option<GamepadAction>
The action for a settings key string, or None if it is not a gamepad
rebind key.
Trait Implementations§
Source§impl Clone for GamepadAction
impl Clone for GamepadAction
Source§fn clone(&self) -> GamepadAction
fn clone(&self) -> GamepadAction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GamepadAction
Source§impl Debug for GamepadAction
impl Debug for GamepadAction
impl Eq for GamepadAction
Source§impl Hash for GamepadAction
impl Hash for GamepadAction
Source§impl PartialEq for GamepadAction
impl PartialEq for GamepadAction
impl StructuralPartialEq for GamepadAction
Auto Trait Implementations§
impl Freeze for GamepadAction
impl RefUnwindSafe for GamepadAction
impl Send for GamepadAction
impl Sync for GamepadAction
impl Unpin for GamepadAction
impl UnsafeUnpin for GamepadAction
impl UnwindSafe for GamepadAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.