pub enum Event {
CursorMoved {
x: f32,
y: f32,
},
CursorEntered,
CursorLeft,
CursorTaken,
CursorReturned,
Input {
state: ButtonState,
button: Button,
},
WheelScrolled {
delta_x: f32,
delta_y: f32,
},
}Expand description
A mouse event.
Variants§
CursorMoved
The mouse cursor was moved
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.
WheelScrolled
The mouse wheel was scrolled.
Trait Implementations§
impl Copy for Event
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> SetParameter for T
impl<T> SetParameter for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§unsafe fn to_subset_unchecked(&self) -> SS
unsafe fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.