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