Struct input::ButtonArgs [] [src]

pub struct ButtonArgs {
    pub state: ButtonState,
    pub button: Button,
    pub scancode: Option<i32>,
}

Button arguments

Fields

New state of the button.

The button that changed state.

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]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for ButtonArgs
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for ButtonArgs
[src]

impl Hash for ButtonArgs
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

impl Debug for ButtonArgs
[src]

Formats the value using the given formatter.