Skip to main content

DefaultLabels

Struct DefaultLabels 

Source
pub struct DefaultLabels;
Expand description

The engine’s labels, every entry of HintLabels left as it is — what ActionMap::hint uses.

Trait Implementations§

Source§

impl Clone for DefaultLabels

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DefaultLabels

Source§

impl Debug for DefaultLabels

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for DefaultLabels

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl HintLabels for DefaultLabels

Source§

fn key(&self, key: KeyCode) -> Cow<'static, str>

A key’s label — Space, W, Shift, Up.
Source§

fn mouse_button(&self, button: PointerButton) -> Cow<'static, str>

A mouse button’s label — LMB, RMB, MMB, Mouse 4.
Source§

fn mouse_motion(&self) -> Cow<'static, str>

Source§

fn wheel(&self) -> Cow<'static, str>

The wheel’s label, for Binding::MouseScroll and after a Binding::ScrollChord’s key.
Source§

fn pointer_position(&self, axis: PointerAxis) -> Cow<'static, str>

Binding::PointerPosition’s label, whichever axis it reads.
Source§

fn control(&self, id: &str) -> Cow<'static, str>

An on-screen control’s label: by default its id, verbatim, since the id is the only name the engine has for it.
Source§

fn pad_button(&self, kind: PadKind, button: PadButton) -> Cow<'static, str>

A pad button’s label on a pad of kind: what that family prints on the button in that position. Read more
Source§

fn dpad(&self, kind: PadKind) -> Cow<'static, str>

Binding::PadDpad’s label on a pad of kind.
Source§

fn stick(&self, kind: PadKind, stick: Stick) -> Cow<'static, str>

A stick’s label on a pad of kind. Every family prints the same words; kind is there for a game whose art differs by family.
Source§

fn trigger(&self, kind: PadKind, trigger: Trigger) -> Cow<'static, str>

A trigger’s label on a pad of kind: LT/RT on Xbox, L2/R2 on PlayStation and the Steam Deck, ZL/ZR on Switch, and Left trigger/Right trigger on a pad the backend could not place.
Source§

fn label(&self, binding: &Binding, kind: PadKind) -> String

A whole binding’s label, composed from the entries above: a chord as its two halves joined by +, a Binding::KeyAxis as its two keys joined by /, and a Binding::Wasd as its four keys in up, left, down, right order — run together when each is one character (WASD), joined by / when not (Up/Left/Down/Right). A pad binding is named for a pad of kind; nothing else reads it.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.