|
dEngine
Simple 2D C++ game engine
|
Event System. More...
#include <EventSystem.h>
Public Types | |
| typedef std::function< void(SDL_Event &)> | EventCallback |
Public Member Functions | |
| EventSystem () | |
| void | RegisterEventCallback (Uint32 eventType, EventCallback callback) |
| Function to register an event callback. More... | |
| void | DeregisterEventCallback (Uint32 eventType) |
| Function to deregister an event callback. More... | |
| void | processEvents () |
| Process events, including custom events. More... | |
| void | cleanup () |
| Clean up resources. More... | |
Public Attributes | |
| std::map< Uint32, EventCallback > | eventCallbacks |
Event System.
| typedef std::function<void(SDL_Event&)> dengine::EventSystem::EventCallback |
| EventSystem::EventSystem | ( | ) |
| void dengine::EventSystem::cleanup | ( | ) |
Clean up resources.
|
inline |
Function to deregister an event callback.
| eventType | The type of event you want to deregister |
|
inline |
Process events, including custom events.
Referenced by dengine::Game::loop().
|
inline |
Function to register an event callback.
| eventType | The type of event your want this registered for |
| callback | The callback itself |
| std::map<Uint32, EventCallback> dengine::EventSystem::eventCallbacks |
1.8.13