Enum sdl2::controller::Button [] [src]

pub enum Button {
    Invalid,
    A,
    B,
    X,
    Y,
    Back,
    Guide,
    Start,
    LeftStick,
    RightStick,
    LeftShoulder,
    RightShoulder,
    DPadUp,
    DPadDown,
    DPadLeft,
    DPadRight,
}

Variants

InvalidABXYBackGuideStartLeftStickRightStickLeftShoulderRightShoulderDPadUpDPadDownDPadLeftDPadRight

Methods

impl Button
[src]

fn from_string(button: &str) -> Result<ButtonNulError>

Return the Button from a string description in the same format used by the game controller mapping strings.

fn get_string(self) -> String

Return a string for a given button in the same format using by the game controller mapping strings

Trait Implementations

impl Debug for Button
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl PartialEq for Button
[src]

fn eq(&self, __arg_0: &Button) -> bool

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

fn ne(&self, other: &Rhs) -> bool
1.0.0

This method tests for !=.

impl Clone for Button
[src]

fn clone(&self) -> Button

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl Copy for Button
[src]