Struct xdl::vi::AxisDirButton[][src]

pub struct AxisDirButton { /* fields omitted */ }

[x, y] axes translated as direction

[x, y] components are “mixed” to make directions. For example, [1, 1] is interpreted as south-east.

Implementations

impl AxisDirButton[src]

pub fn new(
    repeat: KeyRepeatConfig,
    xs: [InputBundle; 2],
    ys: [InputBundle; 2]
) -> Self
[src]

Creates axis from [positive, negative] input bundle in (x, y) axis

Makes sure that the key repeat configuration is shared among buttons (while the states are not shared).

impl AxisDirButton[src]

Lifecycle

pub fn update(&mut self, input: &Input, dt: Duration)[src]

impl AxisDirButton[src]

pub fn dir4_down(&self) -> Option<Dir4>[src]

Creates a directional output mixing axis inputs

pub fn dir4_pressed(&self) -> Option<Dir4>[src]

Creates a directional output mixing axis inputs

pub fn dir8_down(&self) -> Option<Dir8>[src]

Creates a directional output mixing axis inputs

pub fn dir8_pressed(&self) -> Option<Dir8>[src]

Creates a directional output mixing axis inputs

Trait Implementations

impl Clone for AxisDirButton[src]

impl Debug for AxisDirButton[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.