From f938ddad0c19c081137e6133cca37b0b038d3d3f Mon Sep 17 00:00:00 2001 From: notaspirit Date: Fri, 2 Jan 2026 20:07:52 +0100 Subject: [PATCH 1/5] changed cet window to be in the menu bar with the widgets in a drop down menu --- src/overlay/Overlay.cpp | 114 +++++++++++++++++++++------------------- 1 file changed, 60 insertions(+), 54 deletions(-) diff --git a/src/overlay/Overlay.cpp b/src/overlay/Overlay.cpp index 51a55121..d1d25eb1 100644 --- a/src/overlay/Overlay.cpp +++ b/src/overlay/Overlay.cpp @@ -2,6 +2,8 @@ #include "Overlay.h" +#include "config/CETVersion.h" + #include #include @@ -216,13 +218,7 @@ void Overlay::Update() if (!m_enabled) return; - const auto [width, height] = CET::Get().GetD3D12().GetResolution(); - const auto heightLimit = 2 * ImGui::GetFrameHeight() + 2 * ImGui::GetStyle().WindowPadding.y; - ImGui::SetNextWindowPos({width * 0.25f, height * 0.05f}, ImGuiCond_FirstUseEver); - ImGui::SetNextWindowSizeConstraints({width * 0.5f, heightLimit}, {FLT_MAX, heightLimit}); - if (ImGui::Begin("Cyber Engine Tweaks")) - DrawToolbar(); - ImGui::End(); + DrawToolbar(); m_console.Draw(); m_bindings.Draw(); @@ -258,65 +254,75 @@ Overlay::~Overlay() { } +#define EYE_ON_ICON "\xF3\xB0\x9B\x90" +#define EYE_OFF_ICON "\xF3\xB0\x9B\x91" + + void Overlay::DrawToolbar() { - const auto itemWidth = GetAlignedItemWidth(7); auto& persistentState = m_persistentState.Overlay; - ImGui::PushStyleColor(ImGuiCol_Button, persistentState.ConsoleToggled ? ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive) : ImGui::GetStyleColorVec4(ImGuiCol_Button)); - if (ImGui::Button("Console", ImVec2(itemWidth, 0))) - m_console.Toggle(); - if (!m_toggled) - persistentState.ConsoleToggled = m_console.IsEnabled(); - ImGui::PopStyleColor(); - - ImGui::SameLine(); + ImGui::PushStyleColor(ImGuiCol_MenuBarBg, ImVec4(0.2f, 0.2f, 0.15f, 0.4f)); + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, 15); - ImGui::PushStyleColor(ImGuiCol_Button, persistentState.BindingsToggled ? ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive) : ImGui::GetStyleColorVec4(ImGuiCol_Button)); - if (ImGui::Button("Bindings", ImVec2(itemWidth, 0))) - m_bindings.Toggle(); - if (!m_toggled) - persistentState.BindingsToggled = m_bindings.IsEnabled(); - ImGui::PopStyleColor(); + if (ImGui::BeginMainMenuBar()) + { - ImGui::SameLine(); + ImGui::Text(std::format("CyberEngineTweaks v{}", CET_GIT_TAG).c_str()); - ImGui::PushStyleColor(ImGuiCol_Button, persistentState.SettingsToggled ? ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive) : ImGui::GetStyleColorVec4(ImGuiCol_Button)); - if (ImGui::Button("Settings", ImVec2(itemWidth, 0))) - m_settings.Toggle(); - if (!m_toggled) - persistentState.SettingsToggled = m_settings.IsEnabled(); - ImGui::PopStyleColor(); + ImGui::Separator(); - ImGui::SameLine(); + ImGui::PushItemFlag(ImGuiItemFlags_AutoClosePopups, false); - ImGui::PushStyleColor(ImGuiCol_Button, persistentState.TweakDBEditorToggled ? ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive) : ImGui::GetStyleColorVec4(ImGuiCol_Button)); - if (ImGui::Button("TweakDB Editor", ImVec2(itemWidth, 0))) - m_tweakDBEditor.Toggle(); - if (!m_toggled) - persistentState.TweakDBEditorToggled = m_tweakDBEditor.IsEnabled(); - ImGui::PopStyleColor(); - - ImGui::SameLine(); + if (ImGui::BeginMenu("Widgets")) + { + if (ImGui::MenuItem(std::format("{} Console", m_console.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) + m_console.Toggle(); + if (!m_toggled) + persistentState.ConsoleToggled = m_console.IsEnabled(); + + if (ImGui::MenuItem(std::format("{} Bindings", m_bindings.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) + m_bindings.Toggle(); + if (!m_toggled) + persistentState.BindingsToggled = m_bindings.IsEnabled(); + + if (ImGui::MenuItem(std::format("{} Settings", m_settings.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) + m_settings.Toggle(); + if (!m_toggled) + persistentState.SettingsToggled = m_settings.IsEnabled(); + + if (ImGui::MenuItem(std::format("{} TweakDB Editor", m_tweakDBEditor.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) + m_tweakDBEditor.Toggle(); + if (!m_toggled) + persistentState.TweakDBEditorToggled = m_tweakDBEditor.IsEnabled(); + + if (ImGui::MenuItem(std::format("{} Game Log", m_gameLog.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) + m_gameLog.Toggle(); + if (!m_toggled) + persistentState.GameLogToggled = m_gameLog.IsEnabled(); + + if (ImGui::MenuItem(std::format("{} ImGui Debug", m_imguiDebug.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) + m_imguiDebug.Toggle(); + if (!m_toggled) + persistentState.ImGuiDebugToggled = m_imguiDebug.IsEnabled(); + + ImGui::EndMenu(); + } - ImGui::PushStyleColor(ImGuiCol_Button, persistentState.GameLogToggled ? ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive) : ImGui::GetStyleColorVec4(ImGuiCol_Button)); - if (ImGui::Button("Game Log", ImVec2(itemWidth, 0))) - m_gameLog.Toggle(); - if (!m_toggled) - persistentState.GameLogToggled = m_gameLog.IsEnabled(); - ImGui::PopStyleColor(); + ImGui::PopItemFlag(); - ImGui::SameLine(); + if (ImGui::BeginMenu("Reload Mods")) + { + ImGui::CloseCurrentPopup(); + m_vm.ReloadAllMods(); + ImGui::EndMenu(); + } - ImGui::PushStyleColor(ImGuiCol_Button, persistentState.ImGuiDebugToggled ? ImGui::GetStyleColorVec4(ImGuiCol_ButtonActive) : ImGui::GetStyleColorVec4(ImGuiCol_Button)); - if (ImGui::Button("ImGui Debug", ImVec2(itemWidth, 0))) - m_imguiDebug.Toggle(); - if (!m_toggled) - persistentState.ImGuiDebugToggled = m_imguiDebug.IsEnabled(); - ImGui::PopStyleColor(); + ImGui::EndMainMenuBar(); - ImGui::SameLine(); + ImGui::PopStyleColor(); + ImGui::PopStyleVar(); + } - if (ImGui::Button("Reload all mods", ImVec2(itemWidth, 0))) - m_vm.ReloadAllMods(); + ImGui::PopStyleVar(); } From ef8998c529c0e1e6cd36c753ebd7d9a7a1a6d25a Mon Sep 17 00:00:00 2001 From: notaspirit Date: Fri, 2 Jan 2026 21:01:31 +0100 Subject: [PATCH 2/5] cleanup format --- src/overlay/Overlay.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/overlay/Overlay.cpp b/src/overlay/Overlay.cpp index d1d25eb1..5aa7328c 100644 --- a/src/overlay/Overlay.cpp +++ b/src/overlay/Overlay.cpp @@ -257,14 +257,12 @@ Overlay::~Overlay() #define EYE_ON_ICON "\xF3\xB0\x9B\x90" #define EYE_OFF_ICON "\xF3\xB0\x9B\x91" - void Overlay::DrawToolbar() { auto& persistentState = m_persistentState.Overlay; ImGui::PushStyleColor(ImGuiCol_MenuBarBg, ImVec4(0.2f, 0.2f, 0.15f, 0.4f)); ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, 15); - if (ImGui::BeginMainMenuBar()) { @@ -272,10 +270,10 @@ void Overlay::DrawToolbar() ImGui::Separator(); - ImGui::PushItemFlag(ImGuiItemFlags_AutoClosePopups, false); - if (ImGui::BeginMenu("Widgets")) { + ImGui::PushItemFlag(ImGuiItemFlags_AutoClosePopups, false); + if (ImGui::MenuItem(std::format("{} Console", m_console.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) m_console.Toggle(); if (!m_toggled) @@ -306,11 +304,11 @@ void Overlay::DrawToolbar() if (!m_toggled) persistentState.ImGuiDebugToggled = m_imguiDebug.IsEnabled(); + ImGui::PopItemFlag(); + ImGui::EndMenu(); } - ImGui::PopItemFlag(); - if (ImGui::BeginMenu("Reload Mods")) { ImGui::CloseCurrentPopup(); From 5bc769d80737cb419ee317e898e736ac55c557c5 Mon Sep 17 00:00:00 2001 From: notaspirit Date: Sun, 4 Jan 2026 16:13:50 +0100 Subject: [PATCH 3/5] added logic to keep widget popup from closing when a window takes focus --- src/overlay/Overlay.cpp | 56 +++++++++++++++++++++++++++++++++++++++++ src/overlay/Overlay.h | 4 +++ 2 files changed, 60 insertions(+) diff --git a/src/overlay/Overlay.cpp b/src/overlay/Overlay.cpp index 5aa7328c..9c07d15b 100644 --- a/src/overlay/Overlay.cpp +++ b/src/overlay/Overlay.cpp @@ -220,12 +220,40 @@ void Overlay::Update() DrawToolbar(); + // temporarily remove reference to Widget popup window to prevent it from being closed + // when a new window draws and takes focus + if (m_blockWidgetPopupFromBeingClosed) + { + auto ctx = ImGui::GetCurrentContext(); + for (auto& popup : ctx->OpenPopupStack) { + if (popup.PopupId != m_widgetPopupID) + continue; + + m_widgetPopupWindow = popup.Window; + popup.Window = nullptr; + break; + } + } + m_console.Draw(); m_bindings.Draw(); m_settings.Draw(); m_tweakDBEditor.Draw(); m_gameLog.Draw(); m_imguiDebug.Draw(); + + if (m_blockWidgetPopupFromBeingClosed) { + auto ctx = ImGui::GetCurrentContext(); + for (auto& popup : ctx->OpenPopupStack) { + if (popup.PopupId != m_widgetPopupID) + continue; + + popup.Window = m_widgetPopupWindow; + break; + } + m_widgetPopupWindow = nullptr; + m_blockWidgetPopupFromBeingClosed = false; + } } bool Overlay::IsInitialized() const noexcept @@ -270,40 +298,68 @@ void Overlay::DrawToolbar() ImGui::Separator(); + if (m_widgetPopupID == 0) + m_widgetPopupID = ImGui::GetCurrentWindow()->GetID("Widgets"); + if (ImGui::BeginMenu("Widgets")) { ImGui::PushItemFlag(ImGuiItemFlags_AutoClosePopups, false); if (ImGui::MenuItem(std::format("{} Console", m_console.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) + { + if (!m_console.IsEnabled()) + m_blockWidgetPopupFromBeingClosed = true; m_console.Toggle(); + } if (!m_toggled) persistentState.ConsoleToggled = m_console.IsEnabled(); if (ImGui::MenuItem(std::format("{} Bindings", m_bindings.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) + { + if (!m_bindings.IsEnabled()) + m_blockWidgetPopupFromBeingClosed = true; m_bindings.Toggle(); + } if (!m_toggled) persistentState.BindingsToggled = m_bindings.IsEnabled(); if (ImGui::MenuItem(std::format("{} Settings", m_settings.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) + { + if (!m_settings.IsEnabled()) + m_blockWidgetPopupFromBeingClosed = true; m_settings.Toggle(); + } if (!m_toggled) persistentState.SettingsToggled = m_settings.IsEnabled(); if (ImGui::MenuItem(std::format("{} TweakDB Editor", m_tweakDBEditor.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) + { + if (!m_tweakDBEditor.IsEnabled()) + m_blockWidgetPopupFromBeingClosed = true; m_tweakDBEditor.Toggle(); + } if (!m_toggled) persistentState.TweakDBEditorToggled = m_tweakDBEditor.IsEnabled(); if (ImGui::MenuItem(std::format("{} Game Log", m_gameLog.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) + { + if (!m_gameLog.IsEnabled()) + m_blockWidgetPopupFromBeingClosed = true; m_gameLog.Toggle(); + } if (!m_toggled) persistentState.GameLogToggled = m_gameLog.IsEnabled(); if (ImGui::MenuItem(std::format("{} ImGui Debug", m_imguiDebug.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) + { + if (!m_imguiDebug.IsEnabled()) + m_blockWidgetPopupFromBeingClosed = true; m_imguiDebug.Toggle(); + } if (!m_toggled) persistentState.ImGuiDebugToggled = m_imguiDebug.IsEnabled(); + ImGui::PopItemFlag(); ImGui::EndMenu(); diff --git a/src/overlay/Overlay.h b/src/overlay/Overlay.h index ad7c9b73..8e6d7e33 100644 --- a/src/overlay/Overlay.h +++ b/src/overlay/Overlay.h @@ -42,4 +42,8 @@ struct Overlay Options& m_options; PersistentState& m_persistentState; LuaVM& m_vm; + + bool m_blockWidgetPopupFromBeingClosed{false}; + ImGuiID m_widgetPopupID{0}; + ImGuiWindow* m_widgetPopupWindow{nullptr}; }; From b3d10d83edab0b79b209199f9286b7855acb4e37 Mon Sep 17 00:00:00 2001 From: notaspirit Date: Sun, 4 Jan 2026 16:43:48 +0100 Subject: [PATCH 4/5] change menu button to use selectable instead of menu --- src/overlay/Overlay.cpp | 41 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/src/overlay/Overlay.cpp b/src/overlay/Overlay.cpp index 9c07d15b..a9cd04f9 100644 --- a/src/overlay/Overlay.cpp +++ b/src/overlay/Overlay.cpp @@ -282,6 +282,41 @@ Overlay::~Overlay() { } +bool MenuBarButton(const char* label) +{ + ImGuiWindow* window = ImGui::GetCurrentWindow(); + if (window->SkipItems) + return false; + + ImGuiContext& g = *GImGui; + const ImGuiStyle& style = g.Style; + + ImVec2 label_size = ImGui::CalcTextSize(label, nullptr, true); + ImVec2 pos = window->DC.CursorPos; + + ImVec2 text_pos( + window->DC.CursorPos.x, + pos.y + window->DC.CurrLineTextBaseOffset + ); + + + + bool pressed = ImGui::Selectable( + std::format("##{}", label).c_str(), + false, + ImGuiSelectableFlags_NoHoldingActiveID | + ImGuiSelectableFlags_NoSetKeyOwner | + ImGuiSelectableFlags_SelectOnClick, + ImVec2(label_size.x, label_size.y) + ); + + ImGui::RenderText(text_pos, label); + + window->DC.CursorPos.x += IM_TRUNC(style.ItemSpacing.x * (-1.0f + 0.5f)); + + return pressed; +} + #define EYE_ON_ICON "\xF3\xB0\x9B\x90" #define EYE_OFF_ICON "\xF3\xB0\x9B\x91" @@ -365,12 +400,8 @@ void Overlay::DrawToolbar() ImGui::EndMenu(); } - if (ImGui::BeginMenu("Reload Mods")) - { - ImGui::CloseCurrentPopup(); + if (MenuBarButton("Reload Mods")) m_vm.ReloadAllMods(); - ImGui::EndMenu(); - } ImGui::EndMainMenuBar(); From f6877d12cd5cd67e9447e7e8d501e4fa6924b94b Mon Sep 17 00:00:00 2001 From: notaspirit Date: Sat, 7 Mar 2026 21:42:56 +0100 Subject: [PATCH 5/5] remove drop down menu, add selectable style toggle button, adjust menu bar to keep the old layout --- src/overlay/Overlay.cpp | 145 +++++++++++++++++----------------------- src/overlay/Overlay.h | 4 -- 2 files changed, 60 insertions(+), 89 deletions(-) diff --git a/src/overlay/Overlay.cpp b/src/overlay/Overlay.cpp index a9cd04f9..a1b390d2 100644 --- a/src/overlay/Overlay.cpp +++ b/src/overlay/Overlay.cpp @@ -220,40 +220,12 @@ void Overlay::Update() DrawToolbar(); - // temporarily remove reference to Widget popup window to prevent it from being closed - // when a new window draws and takes focus - if (m_blockWidgetPopupFromBeingClosed) - { - auto ctx = ImGui::GetCurrentContext(); - for (auto& popup : ctx->OpenPopupStack) { - if (popup.PopupId != m_widgetPopupID) - continue; - - m_widgetPopupWindow = popup.Window; - popup.Window = nullptr; - break; - } - } - m_console.Draw(); m_bindings.Draw(); m_settings.Draw(); m_tweakDBEditor.Draw(); m_gameLog.Draw(); m_imguiDebug.Draw(); - - if (m_blockWidgetPopupFromBeingClosed) { - auto ctx = ImGui::GetCurrentContext(); - for (auto& popup : ctx->OpenPopupStack) { - if (popup.PopupId != m_widgetPopupID) - continue; - - popup.Window = m_widgetPopupWindow; - break; - } - m_widgetPopupWindow = nullptr; - m_blockWidgetPopupFromBeingClosed = false; - } } bool Overlay::IsInitialized() const noexcept @@ -317,8 +289,38 @@ bool MenuBarButton(const char* label) return pressed; } -#define EYE_ON_ICON "\xF3\xB0\x9B\x90" -#define EYE_OFF_ICON "\xF3\xB0\x9B\x91" +bool MenuBarToggle(const char* label, bool toggled) +{ + ImGuiWindow* window = ImGui::GetCurrentWindow(); + if (window->SkipItems) + return false; + + ImGuiContext& g = *GImGui; + const ImGuiStyle& style = g.Style; + + ImVec2 label_size = ImGui::CalcTextSize(label, nullptr, true); + ImVec2 pos = window->DC.CursorPos; + + ImVec2 text_pos( + window->DC.CursorPos.x, + pos.y + window->DC.CurrLineTextBaseOffset + ); + + bool pressed = ImGui::Selectable( + std::format("##{}", label).c_str(), + toggled, // pass toggle state as 'selected' + ImGuiSelectableFlags_NoHoldingActiveID | + ImGuiSelectableFlags_NoSetKeyOwner | + ImGuiSelectableFlags_SelectOnClick, + ImVec2(label_size.x, label_size.y) + ); + + ImGui::RenderText(text_pos, label); + + window->DC.CursorPos.x += IM_TRUNC(style.ItemSpacing.x * (-1.0f + 0.5f)); + + return pressed; +} void Overlay::DrawToolbar() { @@ -333,71 +335,44 @@ void Overlay::DrawToolbar() ImGui::Separator(); - if (m_widgetPopupID == 0) - m_widgetPopupID = ImGui::GetCurrentWindow()->GetID("Widgets"); + if (MenuBarToggle("Console", m_console.IsEnabled())) + m_console.Toggle(); - if (ImGui::BeginMenu("Widgets")) - { - ImGui::PushItemFlag(ImGuiItemFlags_AutoClosePopups, false); + ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 5); - if (ImGui::MenuItem(std::format("{} Console", m_console.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) - { - if (!m_console.IsEnabled()) - m_blockWidgetPopupFromBeingClosed = true; - m_console.Toggle(); - } - if (!m_toggled) - persistentState.ConsoleToggled = m_console.IsEnabled(); + if (MenuBarToggle("Bindings", m_bindings.IsEnabled())) + m_bindings.Toggle(); - if (ImGui::MenuItem(std::format("{} Bindings", m_bindings.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) - { - if (!m_bindings.IsEnabled()) - m_blockWidgetPopupFromBeingClosed = true; - m_bindings.Toggle(); - } - if (!m_toggled) - persistentState.BindingsToggled = m_bindings.IsEnabled(); + ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 5); - if (ImGui::MenuItem(std::format("{} Settings", m_settings.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) - { - if (!m_settings.IsEnabled()) - m_blockWidgetPopupFromBeingClosed = true; - m_settings.Toggle(); - } - if (!m_toggled) - persistentState.SettingsToggled = m_settings.IsEnabled(); + if (MenuBarToggle("Settings", m_settings.IsEnabled())) + m_settings.Toggle(); - if (ImGui::MenuItem(std::format("{} TweakDB Editor", m_tweakDBEditor.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) - { - if (!m_tweakDBEditor.IsEnabled()) - m_blockWidgetPopupFromBeingClosed = true; - m_tweakDBEditor.Toggle(); - } - if (!m_toggled) - persistentState.TweakDBEditorToggled = m_tweakDBEditor.IsEnabled(); + ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 5); - if (ImGui::MenuItem(std::format("{} Game Log", m_gameLog.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) - { - if (!m_gameLog.IsEnabled()) - m_blockWidgetPopupFromBeingClosed = true; - m_gameLog.Toggle(); - } - if (!m_toggled) - persistentState.GameLogToggled = m_gameLog.IsEnabled(); + if (MenuBarToggle("TweakDB Editor", m_tweakDBEditor.IsEnabled())) + m_tweakDBEditor.Toggle(); - if (ImGui::MenuItem(std::format("{} ImGui Debug", m_imguiDebug.IsEnabled() ? EYE_ON_ICON : EYE_OFF_ICON).c_str())) - { - if (!m_imguiDebug.IsEnabled()) - m_blockWidgetPopupFromBeingClosed = true; - m_imguiDebug.Toggle(); - } - if (!m_toggled) - persistentState.ImGuiDebugToggled = m_imguiDebug.IsEnabled(); + ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 5); + if (MenuBarToggle("Game Log", m_gameLog.IsEnabled())) + m_gameLog.Toggle(); - ImGui::PopItemFlag(); + ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 5); - ImGui::EndMenu(); + if (MenuBarToggle("ImGui Debug", m_imguiDebug.IsEnabled())) + m_imguiDebug.Toggle(); + + ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 5); + + if (!m_toggled) + { + persistentState.ConsoleToggled = m_console.IsEnabled(); + persistentState.BindingsToggled = m_bindings.IsEnabled(); + persistentState.SettingsToggled = m_settings.IsEnabled(); + persistentState.TweakDBEditorToggled = m_tweakDBEditor.IsEnabled(); + persistentState.GameLogToggled = m_gameLog.IsEnabled(); + persistentState.ImGuiDebugToggled = m_imguiDebug.IsEnabled(); } if (MenuBarButton("Reload Mods")) diff --git a/src/overlay/Overlay.h b/src/overlay/Overlay.h index 8e6d7e33..ad7c9b73 100644 --- a/src/overlay/Overlay.h +++ b/src/overlay/Overlay.h @@ -42,8 +42,4 @@ struct Overlay Options& m_options; PersistentState& m_persistentState; LuaVM& m_vm; - - bool m_blockWidgetPopupFromBeingClosed{false}; - ImGuiID m_widgetPopupID{0}; - ImGuiWindow* m_widgetPopupWindow{nullptr}; };