diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-16 15:21:49 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-11-16 15:21:49 +0100 |
commit | 027e67b32a9cca3cac4a186e73fdcc42faeab8c4 (patch) | |
tree | 99f775bd358ee623bcd14f9092dd80d03a360bff /src/example | |
parent | 6e7003c73110cf9ad7e4c72de703dfdc2292d8ca (diff) |
added eventManager reference to interfaces
Diffstat (limited to 'src/example')
-rw-r--r-- | src/example/events.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/example/events.cpp b/src/example/events.cpp index ed519ff..5a0a748 100644 --- a/src/example/events.cpp +++ b/src/example/events.cpp @@ -89,11 +89,13 @@ int main() { // Trigger the events while `testListener` is in scope EventManager::get_instance().trigger_event<KeyPressEvent>(key_press, 1); - EventManager::get_instance().trigger_event(MouseClickEvent{ - .mouse_x = 100, - .mouse_y = 100, - .button = MouseButton::LEFT_MOUSE, - },1); + EventManager::get_instance().trigger_event( + MouseClickEvent{ + .mouse_x = 100, + .mouse_y = 100, + .button = MouseButton::LEFT_MOUSE, + }, + 1); } // custom lambda event handler EventHandler<KeyPressEvent> event_handler = [](const KeyPressEvent & e) { |