diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-13 04:36:09 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2024-01-13 04:36:09 +0100 |
commit | e75f99e22197008bd8a2e6df70c5b7554698300e (patch) | |
tree | d233b819a862fa482a663bb3b60c1a5b6d5474c9 /editor/imgui.cpp | |
parent | 860189e34fb24cc908c306489bf2d62e6c13f5a8 (diff) |
dw
Diffstat (limited to 'editor/imgui.cpp')
-rw-r--r-- | editor/imgui.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/editor/imgui.cpp b/editor/imgui.cpp index 440c9928..1e9dfc89 100644 --- a/editor/imgui.cpp +++ b/editor/imgui.cpp @@ -9,6 +9,7 @@ #include "imgui-raii.hpp" #include "src/light.hpp" #include <Magnum/GL/Renderer.h> +#include <Magnum/ImGuiIntegration/Context.h> #include <imgui.h> namespace floormat { @@ -19,8 +20,11 @@ bool popup_target::operator==(const popup_target&) const = default; void app::init_imgui(Vector2i size) { - if (!_imgui.context()) + if (!_imgui) [[unlikely]] + { _imgui = ImGuiIntegration::Context(Vector2{size}, size, size); + fm_assert(_imgui.context()); + } else _imgui.relayout(Vector2{size}, size, size); } |