[][src]Struct piston_window::ButtonArgs

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 Serialize for ButtonArgs
[src]

impl<'de> Deserialize<'de> for ButtonArgs
[src]

impl Eq for ButtonArgs
[src]

impl Copy for ButtonArgs
[src]

impl Clone for ButtonArgs
[src]

Performs copy-assignment from source. Read more

impl Debug for ButtonArgs
[src]

impl From<ButtonArgs> for Input
[src]

impl Hash for ButtonArgs
[src]

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

impl PartialEq<ButtonArgs> for ButtonArgs
[src]

Auto Trait Implementations

impl Send for ButtonArgs

impl Sync for ButtonArgs

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> SetParameter for T
[src]

Sets value as a parameter of self.

impl<T> Erased for T
[src]