diff options
Diffstat (limited to 'main/imgui.cpp')
| -rw-r--r-- | main/imgui.cpp | 12 |
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); |
