Enum amethyst_input::Button [−][src]
pub enum Button { Key(VirtualKeyCode), ScanCode(u32), Mouse(MouseButton), Controller(u32, ControllerButton), }
A Button is any kind of digital input that the engine supports.
Variants
Key(VirtualKeyCode)
Virtual Keyboard keys, use this when the letter on the key matters more than the position of the key.
ScanCode(u32)
Scan code from keyboard, use this when the position of the key matters more than letter on the key.
Mouse(MouseButton)
Mouse buttons
Controller(u32, ControllerButton)
Controller buttons matching SDL controller model. A tuple of sequential controller_id in order of connection and specific type of used controller button.
Trait Implementations
impl Eq for Button
[src]
impl Eq for Button
impl PartialEq for Button
[src]
impl PartialEq for Button
fn eq(&self, other: &Button) -> bool
[src]
fn eq(&self, other: &Button) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Button) -> bool
[src]
fn ne(&self, other: &Button) -> bool
This method tests for !=
.
impl Debug for Button
[src]
impl Debug for Button
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Copy for Button
[src]
impl Copy for Button
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 From<VirtualKeyCode> for Button
[src]
impl From<VirtualKeyCode> for Button
fn from(keycode: VirtualKeyCode) -> Self
[src]
fn from(keycode: VirtualKeyCode) -> Self
Performs the conversion.
impl From<MouseButton> for Button
[src]
impl From<MouseButton> for Button
fn from(mouse_button: MouseButton) -> Self
[src]
fn from(mouse_button: MouseButton) -> Self
Performs the conversion.