Enum ggez::event::Button [−][src]
#[repr(i32)]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
[src]
impl Button
pub fn from_string(button: &str) -> Option<Button>
[src]
pub 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.
pub fn string(self) -> String
[src]
pub fn string(self) -> String
Return a string for a given button in the same format using by the game controller mapping strings
pub fn from_ll(bitflags: SDL_GameControllerButton) -> Option<Button>
[src]
pub fn from_ll(bitflags: SDL_GameControllerButton) -> Option<Button>
pub fn to_ll(&self) -> SDL_GameControllerButton
[src]
pub fn to_ll(&self) -> SDL_GameControllerButton
Trait Implementations
impl Hash for Button
[src]
impl Hash for Button
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
[src]
fn hash<__H>(&self, state: &mut __H) where
__H: Hasher,
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
[src]Feeds a slice of this type into the given [Hasher
]. Read more
impl Clone for Button
[src]
impl Clone for Button
fn clone(&self) -> Button
[src]
fn clone(&self) -> Button
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)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Button
[src]
impl Debug for Button
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl Copy for Button
[src]
impl Copy for Button
impl Eq for Button
[src]
impl Eq for Button
impl PartialEq<Button> for Button
[src]
impl PartialEq<Button> for Button