Kale
Loading...
Searching...
No Matches
Using the Events System & Responding to User Input

To use the events system, you simply need to inherit from the EventHandler class. From there, you can override any method you wish to receive input from. To actually begin receiving updates, you need to register your events handler to the window class using mainApp->getWindow().registerEvents();. Each event is described below:

Note - registerEvents() takes a raw pointer. If the class pointed to is destructed prior to being removed from events, it will cause a crash.


Note - All event handler callbacks are guaranteed to be called from the main thread. This is done every frame prior to any updates/pre updates.

Note - Depending on your compile settings, these events are directly passed from GLFW or SDL2. GLFW is known to be more lightweight, but lacks some features such as controller databasing. This means that controller binds to enum values may be incorrect when using a GLFW build.