[−][src]Module ggez::event
The event
module contains traits and structs to actually run your game mainloop
and handle top-level state, as well as handle input events such as keyboard
and mouse.
If you don't want to do this, you can write your own mainloop and
check for events on your own, which is not particularly hard. This
just tries to simplify the process a little. See the source code for
this module, or the
eventloop
example
example code to see how to do this.
TODO: UPDATE DOCS!
Re-exports
pub use crate::input::keyboard::KeyMods; |
Modules
winit_event |
|
Structs
EventsLoop | Provides a way to retrieve events from the system and from the windows that were registered to the events loop. |
Enums
Axis | Gamepad's elements which state can be represented by value from -1.0 to 1.0. |
Button | Gamepad's elements which state can be represented by value from 0.0 to 1.0. |
KeyCode | Symbolic name for a keyboard key. |
MouseButton | Describes a button of a mouse controller. |
Traits
EventHandler | A trait defining event callbacks. This is your primary interface with
|
Functions
run | Runs the game's main loop, calling event callbacks on the given state object as events occur. |