Struct input::ButtonArgs 
source · pub struct ButtonArgs {
    pub state: ButtonState,
    pub button: Button,
    pub scancode: Option<i32>,
}Expand description
Button arguments
Fields§
§state: ButtonStateNew 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§
source§impl Clone for ButtonArgs
 
impl Clone for ButtonArgs
source§fn clone(&self) -> ButtonArgs
 
fn clone(&self) -> ButtonArgs
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
 
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from 
source. Read moresource§impl Debug for ButtonArgs
 
impl Debug for ButtonArgs
source§impl<'de> Deserialize<'de> for ButtonArgs
 
impl<'de> Deserialize<'de> for ButtonArgs
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
 
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
    __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<ButtonArgs> for Input
 
impl From<ButtonArgs> for Input
source§fn from(args: ButtonArgs) -> Self
 
fn from(args: ButtonArgs) -> Self
Converts to this type from the input type.