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

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

Variants

A
B
X
Y
Back
Guide
Start
LeftStick
RightStick
LeftShoulder
RightShoulder
DPadUp
DPadDown
DPadLeft
DPadRight

Methods

impl Button

fn from_string(button: &str) -> Option<Button>

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

fn from_ll(bitflags: SDL_GameControllerButton) -> Option<Button>

Trait Implementations

Derived Implementations

impl Debug for Button

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

impl Hash for Button

fn hash<__H: Hasher>(&self, __arg_0: &mut __H)

fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher

impl PartialEq for Button

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

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

impl Eq for Button

impl Clone for Button

fn clone(&self) -> Button

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

impl Copy for Button