[][src]Enum rusty_gfx::event::GameEvent

pub enum GameEvent {
    Quit,
    MouseMoved {
        position: Vec2,
    },
    Button {
        button_value: ButtonValue,
        button_state: ButtonState,
    },
}

GameEvent represents game events caused by a user, such as the mouse moving around, buttons being pushed, or the window being closed.

Variants

Quit

The user pressed Escape or closed the window. We should quit the game.

MouseMoved

Indicates the current position the mouse has moved to. The mouse is now at this location in OpenGL coordinates. Note that on some operating systems this event will fire even if the cursor is outside the bounds of the window.

Fields of MouseMoved

position: Vec2
Button

Indicates that a button with variant ButtonValue has been either pressed or released (variant of ButtonState). Note that both mouse buttons and keyboard buttons are abstracted and collected together into a few logical game buttons.

Fields of Button

button_value: ButtonValuebutton_state: ButtonState

Trait Implementations

impl Clone for GameEvent[src]

impl Copy for GameEvent[src]

impl Debug for GameEvent[src]

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

impl PartialEq<GameEvent> for GameEvent[src]

impl Serialize for GameEvent[src]

impl StructuralPartialEq for GameEvent[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> Content for T where
    T: Copy
[src]

type Owned = T

A type that holds a sized version of the content.

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

impl<T> From<T> for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Scalar for T where
    T: PartialEq<T> + Copy + Any + Debug
[src]

impl<T> SetParameter for T

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 

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

type Owned = T

The resulting type after obtaining ownership.

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,