pub enum AppEvent {
MouseDown(MouseButtonEvent),
MouseUp(MouseButtonEvent),
KeyDown(KeyDownEvent),
KeyUp(KeyUpEvent),
CharEvent(char),
Resized((u32, u32)),
MousePos((f64, f64)),
FileDropped(String),
CloseRequested,
}
Expand description
window event types
Variants§
MouseDown(MouseButtonEvent)
mouse button press
MouseUp(MouseButtonEvent)
mouse button release
KeyDown(KeyDownEvent)
keyboard press
KeyUp(KeyUpEvent)
keyboard release
CharEvent(char)
text input events
Resized((u32, u32))
window resize
MousePos((f64, f64))
mouse cursor position in pixels from the window top-left
FileDropped(String)
a file has been dropped on the game window. Get it with App.get_dropped_file
CloseRequested
window close button was pressed and [AppConfig.intercept_close_request
] is true
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AppEvent
impl RefUnwindSafe for AppEvent
impl Send for AppEvent
impl Sync for AppEvent
impl Unpin for AppEvent
impl UnwindSafe for AppEvent
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