diff options
author | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-08-05 17:07:10 +0200 |
---|---|---|
committer | LaG1924 <12997935+LaG1924@users.noreply.github.com> | 2017-08-05 17:07:10 +0200 |
commit | c9c78e191dd71bacd769bbeccd58b80e4376184b (patch) | |
tree | 4da1a8500dd73dd6368fc89496dc0f428d318c5b /src/Render.cpp | |
parent | 2017-08-03 (diff) | |
download | AltCraft-c9c78e191dd71bacd769bbeccd58b80e4376184b.tar AltCraft-c9c78e191dd71bacd769bbeccd58b80e4376184b.tar.gz AltCraft-c9c78e191dd71bacd769bbeccd58b80e4376184b.tar.bz2 AltCraft-c9c78e191dd71bacd769bbeccd58b80e4376184b.tar.lz AltCraft-c9c78e191dd71bacd769bbeccd58b80e4376184b.tar.xz AltCraft-c9c78e191dd71bacd769bbeccd58b80e4376184b.tar.zst AltCraft-c9c78e191dd71bacd769bbeccd58b80e4376184b.zip |
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); } |