Struct input::ButtonArgs
[−]
[src]
pub struct ButtonArgs { pub state: ButtonState, pub button: Button, pub scancode: Option<i32>, }
Button arguments
Fields
state: ButtonState
New state of the button.
The button that changed state.
scancode: Option<i32>
An optional scancode that tells the physical layout of a keyboard key.
For other devices than keyboard, this is set to None
.
Scancode follows SDL (https://wiki.libsdl.org/SDL_Scancode).
This is stored here to make Button
equality check work with keyboard layouts.
Some window backends might not support scancodes. To test a window backend, use https://github.com/PistonDevelopers/piston-examples/tree/master/user_input
Trait Implementations
impl Copy for ButtonArgs
[src]
impl Clone for ButtonArgs
[src]
fn clone(&self) -> ButtonArgs
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 PartialEq for ButtonArgs
[src]
fn eq(&self, __arg_0: &ButtonArgs) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ButtonArgs) -> bool
This method tests for !=
.
impl Eq for ButtonArgs
[src]
impl Hash for ButtonArgs
[src]
fn hash<__H: Hasher>(&self, __arg_0: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more