add ImGui style editor toggle

This commit is contained in:
lunatic 2022-07-26 08:48:41 +07:00
parent a68cda230f
commit 806a443bfb
3 changed files with 6 additions and 0 deletions

View File

@ -431,6 +431,9 @@ namespace cheat
if (settings.f_NotificationsShow) if (settings.f_NotificationsShow)
DrawNotifications(); DrawNotifications();
if (settings.f_ShowStyleEditor)
ImGui::ShowStyleEditor();
if (settings.f_MenuKey.value().IsReleased() && !ImGui::IsAnyItemActive()) if (settings.f_MenuKey.value().IsReleased() && !ImGui::IsAnyItemActive())
ToggleMenuShow(); ToggleMenuShow();
} }

View File

@ -11,6 +11,7 @@ namespace cheat::feature
NF(f_MenuKey, "Show Cheat Menu Key", "General", Hotkey(VK_F1)), NF(f_MenuKey, "Show Cheat Menu Key", "General", Hotkey(VK_F1)),
NF(f_HotkeysEnabled, "Hotkeys Enabled", "General", true), NF(f_HotkeysEnabled, "Hotkeys Enabled", "General", true),
NF(f_FontSize, "Font size", "General", 16.0f), 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_StatusMove, "Move Status Window", "General::StatusWindow", true),
NF(f_StatusShow, "Show 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); f_FontSize = std::clamp(f_FontSize.value(), 8, 64);
renderer::SetGlobalFontSize(static_cast<float>(f_FontSize)); renderer::SetGlobalFontSize(static_cast<float>(f_FontSize));
} }
ConfigWidget(f_ShowStyleEditor, "Show interface style editor window.");
} }
ImGui::EndGroupPanel(); ImGui::EndGroupPanel();

View File

@ -11,6 +11,7 @@ namespace cheat::feature
config::Field<Hotkey> f_MenuKey; config::Field<Hotkey> f_MenuKey;
config::Field<bool> f_HotkeysEnabled; config::Field<bool> f_HotkeysEnabled;
config::Field<int> f_FontSize; config::Field<int> f_FontSize;
config::Field<bool> f_ShowStyleEditor;
config::Field<bool> f_StatusMove; config::Field<bool> f_StatusMove;
config::Field<bool> f_StatusShow; config::Field<bool> f_StatusShow;