aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-15 12:50:30 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-15 12:50:30 +0100
commit337a957a9e605f16287506b6afda56950e562db3 (patch)
tree062485aa5994801bab33972e0200735fa2127fa2
parentcab672ce6258aec563e7f0e0549281156c0c8d21 (diff)
events example working
-rw-r--r--src/example/events.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/example/events.cpp b/src/example/events.cpp
index 9c59bb7..ed519ff 100644
--- a/src/example/events.cpp
+++ b/src/example/events.cpp
@@ -89,12 +89,11 @@ 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>(MouseClickEvent{
- // .button = MouseButton::LEFT_MOUSE,
- // .mouse_y = 100,
- // .mouse_x = 100,
-
- // },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) {