From e31178f051654f77ff08a8c49274efbf1d233277 Mon Sep 17 00:00:00 2001 From: lunatic <56441863+lunaticwhat@users.noreply.github.com> Date: Tue, 26 Jul 2022 08:48:41 +0700 Subject: [PATCH] add ImGui style editor toggle --- cheat-base/src/cheat-base/cheat/CheatManagerBase.cpp | 3 +++ cheat-base/src/cheat-base/cheat/misc/Settings.cpp | 2 ++ cheat-base/src/cheat-base/cheat/misc/Settings.h | 1 + 3 files changed, 6 insertions(+) diff --git a/cheat-base/src/cheat-base/cheat/CheatManagerBase.cpp b/cheat-base/src/cheat-base/cheat/CheatManagerBase.cpp index cc8789f..4f6781a 100644 --- a/cheat-base/src/cheat-base/cheat/CheatManagerBase.cpp +++ b/cheat-base/src/cheat-base/cheat/CheatManagerBase.cpp @@ -431,6 +431,9 @@ namespace cheat if (settings.f_NotificationsShow) DrawNotifications(); + if (settings.f_ShowStyleEditor) + ImGui::ShowStyleEditor(); + if (settings.f_MenuKey.value().IsReleased() && !ImGui::IsAnyItemActive()) ToggleMenuShow(); } diff --git a/cheat-base/src/cheat-base/cheat/misc/Settings.cpp b/cheat-base/src/cheat-base/cheat/misc/Settings.cpp index f5d40ec..371650d 100644 --- a/cheat-base/src/cheat-base/cheat/misc/Settings.cpp +++ b/cheat-base/src/cheat-base/cheat/misc/Settings.cpp @@ -11,6 +11,7 @@ namespace cheat::feature NF(f_MenuKey, "Show Cheat Menu Key", "General", Hotkey(VK_F1)), NF(f_HotkeysEnabled, "Hotkeys Enabled", "General", true), NF(f_FontSize, "Font size", "General", 16.0f), + NF(f_ShowStyleEditor, "Show Style Editor", "General", false), NF(f_StatusMove, "Move Status Window", "General::StatusWindow", true), NF(f_StatusShow, "Show Status Window", "General::StatusWindow", true), @@ -55,6 +56,7 @@ namespace cheat::feature f_FontSize = std::clamp(f_FontSize.value(), 8, 64); renderer::SetGlobalFontSize(static_cast(f_FontSize)); } + ConfigWidget(f_ShowStyleEditor, "Show interface style editor window."); } ImGui::EndGroupPanel(); diff --git a/cheat-base/src/cheat-base/cheat/misc/Settings.h b/cheat-base/src/cheat-base/cheat/misc/Settings.h index 1a00653..710866b 100644 --- a/cheat-base/src/cheat-base/cheat/misc/Settings.h +++ b/cheat-base/src/cheat-base/cheat/misc/Settings.h @@ -11,6 +11,7 @@ namespace cheat::feature config::Field f_MenuKey; config::Field f_HotkeysEnabled; config::Field f_FontSize; + config::Field f_ShowStyleEditor; config::Field f_StatusMove; config::Field f_StatusShow;