Skip to content

Commit

Permalink
dasd
Browse files Browse the repository at this point in the history
  • Loading branch information
ForserX committed Aug 19, 2024
1 parent aabda4e commit 140f75f
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/Editors/xrEUI/xrUITheme.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ void CUIThemeManager::Draw()
ImGui::ColorEdit4("Title Color", (float*)&colors[ImGuiCol_TitleBg]);
ImGui::ColorEdit4("Active title Color", (float*)&colors[ImGuiCol_TitleBgActive]);

ImGui::SeparatorText("Buttons");
ImGui::ColorEdit4("Button", (float*)&colors[ImGuiCol_Button]);
ImGui::ColorEdit4("Button Hovered", (float*)&colors[ImGuiCol_ButtonHovered]);
ImGui::ColorEdit4("Button Active", (float*)&colors[ImGuiCol_ButtonActive]);
;
ImGui::SeparatorText("Tabs");
ImGui::ColorEdit4("Tab Hovered", (float*)&colors[ImGuiCol_TabHovered]);
ImGui::ColorEdit4("Tab Unfocused", (float*)&colors[ImGuiCol_TabUnfocused]);
Expand Down Expand Up @@ -115,9 +120,6 @@ void CUIThemeManager::InitDefault(bool Forced)
colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.56f, 0.56f, 0.56f, 0.54f);
colors[ImGuiCol_SliderGrab] = ImVec4(0.34f, 0.34f, 0.34f, 0.54f);
colors[ImGuiCol_SliderGrabActive] = ImVec4(0.56f, 0.56f, 0.56f, 0.54f);
colors[ImGuiCol_Button] = ImVec4(0.05f, 0.05f, 0.05f, 0.54f);
colors[ImGuiCol_ButtonHovered] = ImVec4(0.19f, 0.19f, 0.19f, 0.54f);
colors[ImGuiCol_ButtonActive] = ImVec4(0.20f, 0.22f, 0.23f, 1.00f);
colors[ImGuiCol_Header] = ImVec4(0.00f, 0.00f, 0.00f, 0.52f);
colors[ImGuiCol_HeaderHovered] = ImVec4(0.00f, 0.00f, 0.00f, 0.36f);
colors[ImGuiCol_HeaderActive] = ImVec4(0.20f, 0.22f, 0.23f, 0.33f);
Expand Down Expand Up @@ -189,6 +191,9 @@ void CUIThemeManager::InitDefault(bool Forced)
colors[ImGuiCol_TabUnfocused] = ImVec4(0.00f, 0.00f, 0.00f, 0.52f);
colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.14f, 0.14f, 0.14f, 1.00f);
colors[ImGuiCol_TitleBgActive] = ImVec4(0.06f, 0.06f, 0.06f, 1.00f);
colors[ImGuiCol_Button] = ImVec4(0.05f, 0.05f, 0.05f, 0.54f);
colors[ImGuiCol_ButtonHovered] = ImVec4(0.19f, 0.19f, 0.19f, 0.54f);
colors[ImGuiCol_ButtonActive] = ImVec4(0.20f, 0.22f, 0.23f, 1.00f);

IsLoaded = true;
}
Expand Down Expand Up @@ -247,6 +252,9 @@ void CUIThemeManager::Save()
FastJSonWriteImColor(ImGuiCol_TabActive);
FastJSonWriteImColor(ImGuiCol_TabHovered);
FastJSonWriteImColor(ImGuiCol_TitleBgActive);
FastJSonWriteImColor(ImGuiCol_ButtonHovered);
FastJSonWriteImColor(ImGuiCol_ButtonActive);
FastJSonWriteImColor(ImGuiCol_Button);

JSONData["Theme"]["InactiveAlpha"] = TransparentDefault;
JSONData["Theme"]["ActiveAlpha"] = TransparentUnfocused;
Expand Down Expand Up @@ -296,6 +304,10 @@ void CUIThemeManager::Load()
FastJSonReadImColor(ImGuiCol_TabActive);
FastJSonReadImColor(ImGuiCol_TabHovered);
FastJSonReadImColor(ImGuiCol_TitleBgActive);
FastJSonReadImColor(ImGuiCol_ButtonHovered);
FastJSonReadImColor(ImGuiCol_ButtonActive);
FastJSonReadImColor(ImGuiCol_Button);


if (JSONData["Theme"].contains("InactiveAlpha"))
{
Expand Down

0 comments on commit 140f75f

Please sign in to comment.