summaryrefslogtreecommitdiff
path: root/ui/mainApplication.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-06-16 12:28:42 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2024-06-16 12:28:42 +0100
commit3d7a2f7cbc69bcfb5b04d343cb15c3027721b2e7 (patch)
tree650a6fb5baa51313865ddde3e9aa5d1dc611a25b /ui/mainApplication.cpp
parentDisable saving settings automagically (diff)
downloadilt-3d7a2f7cbc69bcfb5b04d343cb15c3027721b2e7.tar.bz2
ilt-3d7a2f7cbc69bcfb5b04d343cb15c3027721b2e7.tar.xz
ilt-3d7a2f7cbc69bcfb5b04d343cb15c3027721b2e7.zip
Integrate ImGUI main calls
Diffstat (limited to 'ui/mainApplication.cpp')
-rw-r--r--ui/mainApplication.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/ui/mainApplication.cpp b/ui/mainApplication.cpp
index 08f49a4..d843ef1 100644
--- a/ui/mainApplication.cpp
+++ b/ui/mainApplication.cpp
@@ -1,6 +1,10 @@
#include "mainApplication.h"
#include "game/gamestate.h"
#include "game/worldobject.h"
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wold-style-cast"
+#include "backends/imgui_impl_sdl2.h"
+#pragma GCC diagnostic pop
void
MainApplication::mainLoop()
@@ -16,6 +20,8 @@ MainApplication::mainLoop()
}
windows.apply(&Window::tick, t_passed);
windows.apply(&Window::refresh);
+ ImGui::UpdatePlatformWindows();
+ ImGui::RenderPlatformWindowsDefault();
t_start = t_end;
}
@@ -29,6 +35,7 @@ MainApplication::processInputs()
isRunning = false;
return;
}
+ ImGui_ImplSDL2_ProcessEvent(&e);
windows.applyOne(&Window::handleInput, e);
}
}