|
Vesper 0.5.1
Vesper is short form for the Latin word for "Bat", as Vesper is designed to be small, lightweight, and easily handle things like particles and flocking behaviors in accordance with the nature of bats. \n It is meant to be a particle simulation, VFX editor, and CAN be used secondarily as a small game engine. GitHub | Vesper Updates | Creator |
Stack-based templated event dispatcher. More...
#include <Event.h>
Public Member Functions | |
| EventDispatcher (Event &event) | |
| Construct an EventDispatcher for a specific event. | |
| template<typename T> | |
| bool | Dispatch (EventFn< T > func) |
| Dispatch the event to the appropriate handler if the types match. | |
Private Types | |
| template<typename T> | |
| using | EventFn = std::function<bool(T&)> |
| Type alias for event handling functions. | |
Private Attributes | |
| Event & | m_Event |
| The event to be dispatched. | |
Stack-based templated event dispatcher.
|
private |
Type alias for event handling functions.
|
inline |
Construct an EventDispatcher for a specific event.
| event | The event to dispatch. |
References m_Event.
Referenced by Vesper::Application::OnEvent(), Vesper::EditorCamera::OnEvent(), Vesper::EditorLayer::OnEvent(), and Vesper::OrthographicCameraController::OnEvent().
|
inline |
Dispatch the event to the appropriate handler if the types match.
| T | The type of the event to dispatch. |
| func | The function to handle the event. |
|
private |
The event to be dispatched.
Referenced by EventDispatcher().