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]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl PartialEq for ButtonArgs
[src]

[src]

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

[src]

This method tests for !=.

impl Eq for ButtonArgs
[src]

impl Hash for ButtonArgs
[src]

[src]

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

1.3.0
[src]

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

impl Debug for ButtonArgs
[src]

[src]

Formats the value using the given formatter. Read more

impl From<ButtonArgs> for Input
[src]

[src]

Performs the conversion.

Auto Trait Implementations

impl Send for ButtonArgs

impl Sync for ButtonArgs