From e7e81b265d183245b5c8668fddf94ec0a5573e5a Mon Sep 17 00:00:00 2001 From: omar Date: Sat, 18 Nov 2017 23:36:37 +0100 Subject: [PATCH] Demo: Tweaks. --- imgui_demo.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index f06464c65..b5a476f1b 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -2135,8 +2135,15 @@ static void ShowExampleMenuFile() } if (ImGui::BeginMenu("Colors")) { + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0,0)); for (int i = 0; i < ImGuiCol_COUNT; i++) - ImGui::MenuItem(ImGui::GetStyleColorName((ImGuiCol)i)); + { + const char* name = ImGui::GetStyleColorName((ImGuiCol)i); + ImGui::ColorButton(name, ImGui::GetStyleColorVec4((ImGuiCol)i)); + ImGui::SameLine(); + ImGui::MenuItem(name); + } + ImGui::PopStyleVar(); ImGui::EndMenu(); } if (ImGui::BeginMenu("Disabled", false)) // Disabled