summaryrefslogtreecommitdiffhomepage
path: root/main/imgui.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2022-10-23 13:08:04 +0200
committerStanislaw Halik <sthalik@misaki.pl>2022-10-23 13:08:04 +0200
commitbbc20636c54b1e408156e397d688e4e591dd601b (patch)
tree947a1982baa0cdffb39339610ac274a01c0447b9 /main/imgui.cpp
parent55f284c6e3d2da6774f758e047945b102b9f5b23 (diff)
move events to separate file
Diffstat (limited to 'main/imgui.cpp')
-rw-r--r--main/imgui.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/main/imgui.cpp b/main/imgui.cpp
index 85661760..b0777d5d 100644
--- a/main/imgui.cpp
+++ b/main/imgui.cpp
@@ -1,14 +1,20 @@
#include "app.hpp"
#include <Magnum/GL/Renderer.h>
#include "imgui-raii.hpp"
-#ifndef __CLION_IDE__zz
-#include <Magnum/ImGuiIntegration/Integration.h>
-#endif
+#include <Magnum/ImGuiIntegration/Context.h>
namespace floormat {
using namespace floormat::imgui;
+void app::init_imgui(Vector2i size)
+{
+ if (!_imgui.context())
+ _imgui = ImGuiIntegration::Context(Vector2{size}, size, size);
+ else
+ _imgui.relayout(Vector2{size}, size, size);
+}
+
void app::render_menu()
{
GL::Renderer::setBlendEquation(GL::Renderer::BlendEquation::Add, GL::Renderer::BlendEquation::Add);