diff options
Diffstat (limited to '')
-rw-r--r-- | src/Render.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Render.cpp b/src/Render.cpp index d45d5b6..9121d1a 100644 --- a/src/Render.cpp +++ b/src/Render.cpp @@ -124,7 +124,12 @@ void Render::SetMouseCapture(bool IsCaptured) { void Render::ExecuteRenderLoop() { EventListener listener; - listener.RegisterHandler(EventType::ConnectionSuccessfull, [this](EventData eventData) { + + listener.RegisterHandler(EventType::GlobalAppState, [this](EventData eventData) { + + }); + + /*listener.RegisterHandler(EventType::ConnectionSuccessfull, [this](EventData eventData) { auto data = std::get<ConnectionSuccessfullData>(eventData); window->setTitle("Connected"); }); @@ -136,7 +141,7 @@ void Render::ExecuteRenderLoop() { listener.RegisterHandler(EventType::RemoveLoadingScreen, [this](EventData eventData) { window->setTitle("Loaded"); - }); + });*/ using namespace std::chrono_literals; LoopExecutionTimeController timer(16ms); @@ -150,6 +155,5 @@ void Render::ExecuteRenderLoop() { listener.HandleEvent(); timer.Update(); } - EventData data = GlobalAppStateData{GlobalState::Exiting}; - EventAgregator::PushEvent(EventType::GlobalAppState, data); + SetGlobalState(GlobalState::Exiting); } |