Enum stick::Input [−][src]
pub enum Input { Move(f32, f32), Camera(f32, f32), ThrottleL(f32), ThrottleR(f32), Accept(Option<bool>), Cancel(Option<bool>), Execute(Option<bool>), Action(Option<bool>), L(u8, Option<bool>), R(u8, Option<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
None // Just Released
Some(true) // Just Pressed
Some(false) // Held down
Variants
Move(f32, f32)
Main joystick movement.
Camera(f32, f32)
Camera / C joystick movement.
ThrottleL(f32)
Left Throttle movement.
ThrottleR(f32)
Right Throttle movement.
Accept(Option<bool>)
Accept (A Button / Left Top Button - Missle / Circle)
Cancel(Option<bool>)
Cancel (B Button / Side Button / Cross)
Execute(Option<bool>)
Execute (X Button / Trigger / Triangle)
Action(Option<bool>)
Action (Y Button / Right Top Button / Square)
L(u8, Option<bool>)
Left Button (0: L Trigger, 1: LZ / L Bumper). 0 is farthest away from user, incrementing as buttons get closer.
R(u8, Option<bool>)
Right Button (0: R Trigger, 1: Z / RZ / R Bumper). 0 is farthest away from user, incrementing as buttons get closer.
Menu(Option<bool>)
Pause Menu (Start Button)
Controls
Show Controls (Guide on XBox, Select on PlayStation). Use as alternative for Menu -> "Controls".
Exit
Exit This Screen (Back on XBox). Use as alternative for Menu -> "Quit" or Cancel, depending on situation.
Up(Option<bool>)
HAT/DPAD Up Button
Down(Option<bool>)
HAT/DPAD Down Button
Left(Option<bool>)
Hat/D-Pad left button
Right(Option<bool>)
Hat/D-Pad right button.
MoveStick(Option<bool>)
Movement stick Push
CamStick(Option<bool>)
Camera stick Push
PluggedIn(i32)
Device Plugged-In
UnPlugged(i32)
Device Un-Plugged
Trait Implementations
impl PartialEq for Input
[src]
impl PartialEq for Input
fn eq(&self, other: &Input) -> bool
[src]
fn eq(&self, other: &Input) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Input) -> bool
[src]
fn ne(&self, other: &Input) -> bool
This method tests for !=
.
impl Copy for Input
[src]
impl Copy for Input
impl Clone for Input
[src]
impl Clone for Input
fn clone(&self) -> Input
[src]
fn clone(&self) -> Input
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Display for Input
[src]
impl Display for Input