[][src]Struct glerminal::Input

pub struct Input<T: PartialEq + Copy> { /* fields omitted */ }

Input contains the necessary infoamtions to satisfy all your binary input-gathering needs!

Input is used for keyboard input (VirtualKeyCode) and mouse input (MouseButton). See Events-documentation for usage information.

Methods

impl<T: PartialEq + Copy> Input<T>
[src]

pub fn is_pressed(&self, button: T) -> bool
[src]

Returns wether the button is currently pressed. Does not care when it was pressed.

pub fn was_just_pressed(&self, button: T) -> bool
[src]

Returns wether the button was pressed this frame.

pub fn was_just_released(&self, button: T) -> bool
[src]

Returns wether the button was released this frame.

pub fn get_just_pressed_list(&self) -> Vec<T>
[src]

Returns an entire list of buttons that were just pressed.

pub fn get_just_released_list(&self) -> Vec<T>
[src]

Returns an entire list of buttons that were just released.

pub fn get_pressed_list(&self) -> Vec<T>
[src]

Returns an entire list of buttons that are pressed right now.

Trait Implementations

impl<T: Clone + PartialEq + Copy> Clone for Input<T>
[src]

fn clone_from(&mut self, source: &Self)
1.0.0
[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl<T> Send for Input<T> where
    T: Send

impl<T> Sync for Input<T> where
    T: Sync

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]

type Owned = T

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

type Error = !

🔬 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> BorrowMut for T where
    T: ?Sized
[src]

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

type Error = <U as TryFrom<T>>::Error

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

The type returned in the event of a conversion error.

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

impl<T> Erased for T

impl<T> Downcast for T where
    T: Any