From 22c1d7ededb8662f54a494f129ac75214da09457 Mon Sep 17 00:00:00 2001 From: ocornut Date: Sun, 4 Jan 2015 19:37:24 +0000 Subject: [PATCH] Renamed some color enums --- imgui.cpp | 20 ++++++++++---------- imgui.h | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 135ef077..1bd32dd0 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -372,9 +372,9 @@ ImGuiStyle::ImGuiStyle() Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.40f, 0.40f, 0.80f, 0.40f); Colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.80f, 0.50f, 0.50f, 0.40f); Colors[ImGuiCol_ComboBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.99f); - Colors[ImGuiCol_CheckBgHovered] = ImVec4(0.60f, 0.40f, 0.40f, 0.45f); - Colors[ImGuiCol_CheckBgActive] = ImVec4(0.65f, 0.50f, 0.50f, 0.55f); - Colors[ImGuiCol_CheckSelected] = ImVec4(0.90f, 0.90f, 0.90f, 0.50f); + Colors[ImGuiCol_CheckHovered] = ImVec4(0.60f, 0.40f, 0.40f, 0.45f); + Colors[ImGuiCol_CheckActive] = ImVec4(0.65f, 0.50f, 0.50f, 0.55f); + Colors[ImGuiCol_CheckMark] = ImVec4(0.90f, 0.90f, 0.90f, 0.50f); Colors[ImGuiCol_SliderGrab] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f); Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.80f, 0.50f, 0.50f, 1.00f); Colors[ImGuiCol_Button] = ImVec4(0.67f, 0.40f, 0.40f, 0.60f); @@ -2881,9 +2881,9 @@ const char* ImGui::GetStyleColName(ImGuiCol idx) case ImGuiCol_ScrollbarGrabHovered: return "ScrollbarGrabHovered"; case ImGuiCol_ScrollbarGrabActive: return "ScrollbarGrabActive"; case ImGuiCol_ComboBg: return "ComboBg"; - case ImGuiCol_CheckBgHovered: return "CheckBgHovered"; - case ImGuiCol_CheckBgActive: return "CheckBgActive"; - case ImGuiCol_CheckSelected: return "CheckSelected"; + case ImGuiCol_CheckHovered: return "CheckBgHovered"; + case ImGuiCol_CheckActive: return "CheckBgActive"; + case ImGuiCol_CheckMark: return "CheckSelected"; case ImGuiCol_SliderGrab: return "SliderGrab"; case ImGuiCol_SliderGrabActive: return "SliderGrabActive"; case ImGuiCol_Button: return "Button"; @@ -4384,12 +4384,12 @@ bool ImGui::Checkbox(const char* label, bool* v) if (pressed) *v = !(*v); - RenderFrame(check_bb.Min, check_bb.Max, window->Color((held && hovered) ? ImGuiCol_CheckBgActive : hovered ? ImGuiCol_CheckBgHovered : ImGuiCol_FrameBg)); + RenderFrame(check_bb.Min, check_bb.Max, window->Color((held && hovered) ? ImGuiCol_CheckActive : hovered ? ImGuiCol_CheckHovered : ImGuiCol_FrameBg)); if (*v) { const float check_sz = ImMin(check_bb.GetWidth(), check_bb.GetHeight()); const float pad = check_sz < 8.0f ? 1.0f : check_sz < 13.0f ? 2.0f : 3.0f; - window->DrawList->AddRectFilled(check_bb.Min+ImVec2(pad,pad), check_bb.Max-ImVec2(pad,pad), window->Color(ImGuiCol_CheckSelected)); + window->DrawList->AddRectFilled(check_bb.Min+ImVec2(pad,pad), check_bb.Max-ImVec2(pad,pad), window->Color(ImGuiCol_CheckMark)); } if (g.LogEnabled) @@ -4446,12 +4446,12 @@ bool ImGui::RadioButton(const char* label, bool active) bool hovered, held; bool pressed = ButtonBehaviour(total_bb, id, &hovered, &held, true); - window->DrawList->AddCircleFilled(center, radius, window->Color((held && hovered) ? ImGuiCol_CheckBgActive : hovered ? ImGuiCol_CheckBgHovered : ImGuiCol_FrameBg), 16); + window->DrawList->AddCircleFilled(center, radius, window->Color((held && hovered) ? ImGuiCol_CheckActive : hovered ? ImGuiCol_CheckHovered : ImGuiCol_FrameBg), 16); if (active) { const float check_sz = ImMin(check_bb.GetWidth(), check_bb.GetHeight()); const float pad = check_sz < 8.0f ? 1.0f : check_sz < 13.0f ? 2.0f : 3.0f; - window->DrawList->AddCircleFilled(center, radius-pad, window->Color(ImGuiCol_CheckSelected), 16); + window->DrawList->AddCircleFilled(center, radius-pad, window->Color(ImGuiCol_CheckMark), 16); } if (window->Flags & ImGuiWindowFlags_ShowBorders) diff --git a/imgui.h b/imgui.h index 1a2e5bf3..ddf94b11 100644 --- a/imgui.h +++ b/imgui.h @@ -385,9 +385,9 @@ enum ImGuiCol_ ImGuiCol_ScrollbarGrabHovered, ImGuiCol_ScrollbarGrabActive, ImGuiCol_ComboBg, - ImGuiCol_CheckBgHovered, - ImGuiCol_CheckBgActive, - ImGuiCol_CheckSelected, + ImGuiCol_CheckHovered, + ImGuiCol_CheckActive, + ImGuiCol_CheckMark, ImGuiCol_SliderGrab, ImGuiCol_SliderGrabActive, ImGuiCol_Button,