1
0
mirror of https://github.com/ocornut/imgui.git synced 2024-11-24 15:50:25 +01:00

Renamed some color enums

This commit is contained in:
ocornut 2015-01-04 19:37:24 +00:00
parent 39373b563b
commit 22c1d7eded
2 changed files with 13 additions and 13 deletions

View File

@ -372,9 +372,9 @@ ImGuiStyle::ImGuiStyle()
Colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.40f, 0.40f, 0.80f, 0.40f); 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_ScrollbarGrabActive] = ImVec4(0.80f, 0.50f, 0.50f, 0.40f);
Colors[ImGuiCol_ComboBg] = ImVec4(0.20f, 0.20f, 0.20f, 0.99f); 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_CheckHovered] = ImVec4(0.60f, 0.40f, 0.40f, 0.45f);
Colors[ImGuiCol_CheckBgActive] = ImVec4(0.65f, 0.50f, 0.50f, 0.55f); Colors[ImGuiCol_CheckActive] = ImVec4(0.65f, 0.50f, 0.50f, 0.55f);
Colors[ImGuiCol_CheckSelected] = ImVec4(0.90f, 0.90f, 0.90f, 0.50f); 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_SliderGrab] = ImVec4(1.00f, 1.00f, 1.00f, 0.30f);
Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.80f, 0.50f, 0.50f, 1.00f); Colors[ImGuiCol_SliderGrabActive] = ImVec4(0.80f, 0.50f, 0.50f, 1.00f);
Colors[ImGuiCol_Button] = ImVec4(0.67f, 0.40f, 0.40f, 0.60f); 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_ScrollbarGrabHovered: return "ScrollbarGrabHovered";
case ImGuiCol_ScrollbarGrabActive: return "ScrollbarGrabActive"; case ImGuiCol_ScrollbarGrabActive: return "ScrollbarGrabActive";
case ImGuiCol_ComboBg: return "ComboBg"; case ImGuiCol_ComboBg: return "ComboBg";
case ImGuiCol_CheckBgHovered: return "CheckBgHovered"; case ImGuiCol_CheckHovered: return "CheckBgHovered";
case ImGuiCol_CheckBgActive: return "CheckBgActive"; case ImGuiCol_CheckActive: return "CheckBgActive";
case ImGuiCol_CheckSelected: return "CheckSelected"; case ImGuiCol_CheckMark: return "CheckSelected";
case ImGuiCol_SliderGrab: return "SliderGrab"; case ImGuiCol_SliderGrab: return "SliderGrab";
case ImGuiCol_SliderGrabActive: return "SliderGrabActive"; case ImGuiCol_SliderGrabActive: return "SliderGrabActive";
case ImGuiCol_Button: return "Button"; case ImGuiCol_Button: return "Button";
@ -4384,12 +4384,12 @@ bool ImGui::Checkbox(const char* label, bool* v)
if (pressed) if (pressed)
*v = !(*v); *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) if (*v)
{ {
const float check_sz = ImMin(check_bb.GetWidth(), check_bb.GetHeight()); 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; 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) if (g.LogEnabled)
@ -4446,12 +4446,12 @@ bool ImGui::RadioButton(const char* label, bool active)
bool hovered, held; bool hovered, held;
bool pressed = ButtonBehaviour(total_bb, id, &hovered, &held, true); 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) if (active)
{ {
const float check_sz = ImMin(check_bb.GetWidth(), check_bb.GetHeight()); 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; 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) if (window->Flags & ImGuiWindowFlags_ShowBorders)

View File

@ -385,9 +385,9 @@ enum ImGuiCol_
ImGuiCol_ScrollbarGrabHovered, ImGuiCol_ScrollbarGrabHovered,
ImGuiCol_ScrollbarGrabActive, ImGuiCol_ScrollbarGrabActive,
ImGuiCol_ComboBg, ImGuiCol_ComboBg,
ImGuiCol_CheckBgHovered, ImGuiCol_CheckHovered,
ImGuiCol_CheckBgActive, ImGuiCol_CheckActive,
ImGuiCol_CheckSelected, ImGuiCol_CheckMark,
ImGuiCol_SliderGrab, ImGuiCol_SliderGrab,
ImGuiCol_SliderGrabActive, ImGuiCol_SliderGrabActive,
ImGuiCol_Button, ImGuiCol_Button,