Enum piston::input::Button []

pub enum Button {
    Keyboard(Key),
    Mouse(MouseButton),
    Joystick(JoystickButton),
}

Models different kinds of buttons.

Variants

Keyboard(Key)

A keyboard button.

Mouse(MouseButton)

A mouse button.

Joystick(JoystickButton)

A joystick button.

Trait Implementations

impl Debug for Button

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

impl Hash for Button

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

impl Eq for Button

impl PartialEq<Button> for Button

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

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

impl Encodable for Button

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

impl Decodable for Button

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

impl Clone for Button

fn clone(&self) -> Button

impl Copy for Button

impl From<Key> for Button

fn from(key: Key) -> Button

impl From<MouseButton> for Button

fn from(btn: MouseButton) -> Button

impl From<JoystickButton> for Button