Struct piston::input::JoystickButton []

pub struct JoystickButton {
    pub id: i32,
    pub button: u8,
}

Components of a joystick button event. Not guaranteed consistent across backends.

Fields

id: i32

Which joystick was the button on.

button: u8

Which button was pressed.

Methods

impl JoystickButton

fn new(id: i32, button: u8) -> JoystickButton

Create a new JoystickButton object. Intended for use by backends when emitting events.

Trait Implementations

impl Hash for JoystickButton

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

impl Debug for JoystickButton

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

impl Eq for JoystickButton

impl PartialEq<JoystickButton> for JoystickButton

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

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

impl Encodable for JoystickButton

fn encode<__S>(&self, __arg_0: &mut __S) -> Result<(), __S::Error> where __S: Encoder

impl Decodable for JoystickButton

fn decode<__D>(__arg_0: &mut __D) -> Result<JoystickButton, __D::Error> where __D: Decoder

impl Clone for JoystickButton

fn clone(&self) -> JoystickButton

impl Copy for JoystickButton