aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/EventManager.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-15 12:43:38 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-11-15 12:43:38 +0100
commitcab672ce6258aec563e7f0e0549281156c0c8d21 (patch)
treee4b825c5fed4282672aeb18d4bd405710f20349d /src/crepe/api/EventManager.cpp
parent22a3ba4d0773d6010704ec494a08f5d95f564a94 (diff)
feedback
Diffstat (limited to 'src/crepe/api/EventManager.cpp')
-rw-r--r--src/crepe/api/EventManager.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/crepe/api/EventManager.cpp b/src/crepe/api/EventManager.cpp
index 72cfd74..e881d49 100644
--- a/src/crepe/api/EventManager.cpp
+++ b/src/crepe/api/EventManager.cpp
@@ -1,5 +1,7 @@
#include "EventManager.h"
+using namespace crepe;
+
EventManager & EventManager::get_instance() {
static EventManager instance;
return instance;
@@ -62,6 +64,7 @@ void EventManager::dispatch_events() {
iterator handler_it
= handlers.begin();
handler_it != handlers.end(); ++handler_it) {
+ // remove event from queue since and continue when callback returns true
if ((*handler_it)->exec(*event)) {
event_it = this->events_queue.erase(event_it);
event_handled = true;