From ab69e41cabd6f5a84ebb2e2629d194b49b7039de Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Wed, 13 Nov 2024 12:22:17 +0100 Subject: added some extra comments --- src/example/events.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/example/events.cpp') 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(std::move(event_handler),0); - // - + // testing trigger with testListener not in scope (unsubscribed) EventManager::get_instance().trigger_event(key_press, 0); - EventManager::get_instance().trigger_event(click_event, 0); + // dispatching queued events EventManager::get_instance().dispatch_events(); - + EventManager::get_instance().unsubscribe(event_handler,0); return EXIT_SUCCESS; } -- cgit v1.2.3