Enum sdl2::joystick::HatState [] [src]

pub enum HatState {
    Centered,
    Up,
    Right,
    Down,
    Left,
    RightUp,
    RightDown,
    LeftUp,
    Leftdown,
}

This is represented in SDL2 as a bitfield but obviously not all combinations make sense: 5 for instance would mean up and down at the same time... To simplify things I turn it into an enum which is how the SDL2 docs present it anyway (using macros).

Variants

CenteredUpRightDownLeftRightUpRightDownLeftUpLeftdown

Methods

impl HatState
[src]

fn from_raw(raw: u8) -> HatState

Trait Implementations

impl Debug for HatState
[src]

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

Formats the value using the given formatter.

impl Hash for HatState
[src]

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

Feeds this value into the state given, updating the hasher as necessary.

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

Feeds a slice of this type into the state provided.

impl PartialEq for HatState
[src]

fn eq(&self, __arg_0: &HatState) -> 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 Eq for HatState
[src]

impl Clone for HatState
[src]

fn clone(&self) -> HatState

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 HatState
[src]