aboutsummaryrefslogtreecommitdiff
path: root/src/example/events.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-13 12:22:17 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-13 12:22:17 +0100
commitab69e41cabd6f5a84ebb2e2629d194b49b7039de (patch)
tree16f95b45b01e59ffef7cd4c5f0cb4aa499c4b804 /src/example/events.cpp
parentab0c50d5b719863ab9e9821e6720bba450e174ce (diff)
added some extra comments
Diffstat (limited to 'src/example/events.cpp')
-rw-r--r--src/example/events.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/example/events.cpp b/src/example/events.cpp
index 1a29d80..af5f747 100644
--- a/src/example/events.cpp
+++ b/src/example/events.cpp
@@ -91,13 +91,12 @@ int main() {
return false;
};
EventManager::get_instance().subscribe<KeyPressEvent>(std::move(event_handler),0);
- //
-
+ // testing trigger with testListener not in scope (unsubscribed)
EventManager::get_instance().trigger_event<KeyPressEvent>(key_press, 0);
-
EventManager::get_instance().trigger_event<MouseClickEvent>(click_event, 0);
+ // dispatching queued events
EventManager::get_instance().dispatch_events();
-
+
EventManager::get_instance().unsubscribe<KeyPressEvent>(event_handler,0);
return EXIT_SUCCESS;
}