[][src]Enum coffee::input::mouse::Event

pub enum Event {
    CursorMoved {
        x: f32,
        y: f32,
    },
    CursorEntered,
    CursorLeft,
    CursorTaken,
    CursorReturned,
    Input {
        state: ButtonState,
        button: Button,
    },
    WheelScrolled {
        delta_x: f32,
        delta_y: f32,
    },
}

A mouse event.

Variants

CursorMoved

The mouse cursor was moved

Fields of CursorMoved

x: f32

The X coordinate of the mouse position

y: f32

The Y coordinate of the mouse position

CursorEntered

The mouse cursor entered the game window.

CursorLeft

The mouse cursor left the game window.

CursorTaken

The mouse cursor has been taken and is in use.

This event is fired when the cursor is hovering or interacting with a UserInterface.

CursorReturned

The mouse cursor has been returned and is no longer in use.

Input

A mouse button was pressed or released.

Fields of Input

state: ButtonState

The state of the button

button: Button

The button identifier

WheelScrolled

The mouse wheel was scrolled.

Fields of WheelScrolled

delta_x: f32

The number of horizontal lines scrolled

delta_y: f32

The number of vertical lines scrolled

Trait Implementations

impl Clone for Event[src]

impl Copy for Event[src]

impl Debug for Event[src]

impl PartialEq<Event> for Event[src]

impl StructuralPartialEq for Event[src]

Auto Trait Implementations

impl RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

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> 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>,