diff --git a/src/Framework.cpp b/src/Framework.cpp index 29fc98f5..e33b4585 100644 --- a/src/Framework.cpp +++ b/src/Framework.cpp @@ -1267,7 +1267,8 @@ void Framework::draw_ui() { ImGui::SetNextWindowFocus(); } - if (ImGui::BeginChild("UEVRRightPane", ImVec2(0, 0), true, ImGuiWindowFlags_::ImGuiWindowFlags_AlwaysUseWindowPadding)) { + ImGui::BeginChild("UEVRRightPane", ImVec2(0, 0), true, ImGuiWindowFlags_::ImGuiWindowFlags_AlwaysUseWindowPadding); + { ImGui::BeginGroup(); if (m_sidebar_state.selected_entry > 0) { diff --git a/src/mods/UObjectHook.cpp b/src/mods/UObjectHook.cpp index 32c8a117..6ce226f7 100644 --- a/src/mods/UObjectHook.cpp +++ b/src/mods/UObjectHook.cpp @@ -1329,13 +1329,14 @@ void UObjectHook::on_draw_ui() { } const auto wide_filter = utility::widen(filter); - - bool made_child = ImGui::BeginChild("Objects by class entries", ImVec2(0, 0), true, ImGuiWindowFlags_::ImGuiWindowFlags_HorizontalScrollbar); + const bool made_child = ImGui::BeginChild("Objects by class entries", ImVec2(0, 0), true, ImGuiWindowFlags_::ImGuiWindowFlags_HorizontalScrollbar); utility::ScopeGuard sg{[made_child]() { - if (made_child) { + //if (made_child) { + // well apparently BeginChild doesn't care about if it returned true or not so... + // TODO: check this every time we update imgui? ImGui::EndChild(); - } + //} }}; for (auto uclass : m_sorted_classes) {