From bbc20636c54b1e408156e397d688e4e591dd601b Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 23 Oct 2022 13:08:04 +0200 Subject: move events to separate file --- main/imgui.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'main/imgui.cpp') 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 #include "imgui-raii.hpp" -#ifndef __CLION_IDE__zz -#include -#endif +#include 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); -- cgit v1.2.3