CFramework/CFramework/Cheat/UI/MenuTheme.cpp

72 lines
3.2 KiB
C++

#include "MenuTheme.h"
namespace UI::Theme
{
const ImVec4 WindowBackground{ 0.067f, 0.075f, 0.094f, 1.f }; // #111318
const ImVec4 CardBackground{ 0.090f, 0.102f, 0.125f, 1.f }; // #171A20
const ImVec4 SecondaryBackground{ 0.114f, 0.129f, 0.161f, 1.f }; // #1D2129
const ImVec4 SecondaryHover{ 0.150f, 0.173f, 0.216f, 1.f };
const ImVec4 TextPrimary{ 0.910f, 0.922f, 0.941f, 1.f }; // #E8EBF0
const ImVec4 TextSecondary{ 0.545f, 0.576f, 0.647f, 1.f }; // #8B93A5
const ImVec4 Accent{ 0.286f, 0.827f, 0.729f, 1.f }; // cyan teal
const ImVec4 AccentStrong{ 0.400f, 0.898f, 0.804f, 1.f };
const ImVec4 AccentSoft{ 0.286f, 0.827f, 0.729f, 0.18f };
const ImVec4 Border{ 1.f, 1.f, 1.f, 0.07f };
const ImVec4 ToggleOff{ 0.235f, 0.255f, 0.306f, 1.f };
const ImVec4 Danger{ 0.930f, 0.330f, 0.350f, 1.f };
const ImVec4 DangerSoft{ 0.390f, 0.150f, 0.170f, 1.f };
ImU32 U32(const ImVec4& color)
{
return ImGui::GetColorU32(color);
}
void ApplyTheme()
{
ImGuiStyle& style = ImGui::GetStyle();
style.WindowRounding = WindowRounding;
style.ChildRounding = CardRounding;
style.FrameRounding = FrameRounding;
style.PopupRounding = PopupRounding;
style.ScrollbarRounding = ScrollbarRounding;
style.GrabRounding = GrabRounding;
style.WindowPadding = ImVec2(16.f, 14.f);
style.FramePadding = ImVec2(10.f, 7.f);
style.ItemSpacing = ImVec2(10.f, 8.f);
style.ItemInnerSpacing = ImVec2(8.f, 6.f);
style.ScrollbarSize = 10.f;
style.GrabMinSize = 10.f;
style.WindowBorderSize = 0.f;
style.ChildBorderSize = 1.f;
style.FrameBorderSize = 0.f;
style.PopupBorderSize = 1.f;
style.Colors[ImGuiCol_WindowBg] = WindowBackground;
style.Colors[ImGuiCol_ChildBg] = CardBackground;
style.Colors[ImGuiCol_PopupBg] = SecondaryBackground;
style.Colors[ImGuiCol_Border] = Border;
style.Colors[ImGuiCol_BorderShadow] = ImVec4(0.f, 0.f, 0.f, 0.f);
style.Colors[ImGuiCol_FrameBg] = SecondaryBackground;
style.Colors[ImGuiCol_FrameBgHovered] = SecondaryHover;
style.Colors[ImGuiCol_FrameBgActive] = AccentSoft;
style.Colors[ImGuiCol_TitleBg] = WindowBackground;
style.Colors[ImGuiCol_TitleBgActive] = WindowBackground;
style.Colors[ImGuiCol_Button] = SecondaryBackground;
style.Colors[ImGuiCol_ButtonHovered] = SecondaryHover;
style.Colors[ImGuiCol_ButtonActive] = AccentSoft;
style.Colors[ImGuiCol_Header] = SecondaryBackground;
style.Colors[ImGuiCol_HeaderHovered] = SecondaryHover;
style.Colors[ImGuiCol_HeaderActive] = AccentSoft;
style.Colors[ImGuiCol_SliderGrab] = Accent;
style.Colors[ImGuiCol_SliderGrabActive] = AccentStrong;
style.Colors[ImGuiCol_CheckMark] = Accent;
style.Colors[ImGuiCol_Separator] = Border;
style.Colors[ImGuiCol_SeparatorHovered] = AccentSoft;
style.Colors[ImGuiCol_SeparatorActive] = Accent;
style.Colors[ImGuiCol_Text] = TextPrimary;
style.Colors[ImGuiCol_TextDisabled] = TextSecondary;
style.Colors[ImGuiCol_TextSelectedBg] = AccentSoft;
style.Colors[ImGuiCol_NavHighlight] = AccentSoft;
}
}