aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/manager/EventManager.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-11 19:53:15 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-11 19:53:15 +0100
commitbb2a6f1a0ab19f6cbc78b2747a26920f24bf13ca (patch)
treee0a67f752141aa9b8adc7ed72f47f9b74174533e /src/crepe/manager/EventManager.cpp
parent007fe1ecb5e9f76539cdffd6a96afe22c8b2d214 (diff)
parent59954bfc14cdb32997a3fb09e6ee1b393a4dc027 (diff)
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/text-component
Diffstat (limited to 'src/crepe/manager/EventManager.cpp')
-rw-r--r--src/crepe/manager/EventManager.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/crepe/manager/EventManager.cpp b/src/crepe/manager/EventManager.cpp
index 20f0dd3..6aa49ee 100644
--- a/src/crepe/manager/EventManager.cpp
+++ b/src/crepe/manager/EventManager.cpp
@@ -3,11 +3,9 @@
using namespace crepe;
using namespace std;
-EventManager & EventManager::get_instance() {
- static EventManager instance;
- return instance;
+EventManager::EventManager(Mediator & mediator) : Manager(mediator) {
+ this->mediator.event_manager = *this;
}
-
void EventManager::dispatch_events() {
for (auto & event : this->events_queue) {
this->handle_event(event.type, event.channel, *event.event.get());