Enum stick::Input[][src]

pub enum Input {
    Move(f32f32),
    Camera(f32f32),
    ThrottleL(f32),
    ThrottleR(f32),
    Accept(Option<bool>),
    Cancel(Option<bool>),
    Execute(Option<bool>),
    Action(Option<bool>),
    L(u8Option<bool>),
    R(u8Option<bool>),
    Menu(Option<bool>),
    Controls,
    Exit,
    Up(Option<bool>),
    Down(Option<bool>),
    Left(Option<bool>),
    Right(Option<bool>),
    MoveStick(Option<bool>),
    CamStick(Option<bool>),
    PluggedIn(i32),
    UnPlugged(i32),
}

Controller Input

On buttons, Option is used to specify button state:

  • None // Just Released
  • Some(true) // Just Pressed
  • Some(false) // Held down

Variants

Main joystick movement.

Camera / C joystick movement.

Left Throttle movement.

Right Throttle movement.

Accept (A Button / Left Top Button - Missle / Circle)

Cancel (B Button / Side Button / Cross)

Execute (X Button / Trigger / Triangle)

Action (Y Button / Right Top Button / Square)

Left Button (0: L Trigger, 1: LZ / L Bumper). 0 is farthest away from user, incrementing as buttons get closer.

Right Button (0: R Trigger, 1: Z / RZ / R Bumper). 0 is farthest away from user, incrementing as buttons get closer.

Pause Menu (Start Button)

Show Controls (Guide on XBox, Select on PlayStation). Use as alternative for Menu -> "Controls".

Exit This Screen (Back on XBox). Use as alternative for Menu -> "Quit" or Cancel, depending on situation.

HAT/DPAD Up Button

HAT/DPAD Down Button

Hat/D-Pad left button

Hat/D-Pad right button.

Movement stick Push

Camera stick Push

Device Plugged-In

Device Un-Plugged

Trait Implementations

impl PartialEq for Input
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Copy for Input
[src]

impl Clone for Input
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Display for Input
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Input

impl Sync for Input