|
|
@ -2330,15 +2330,16 @@ static void ShowExampleMenuFile() |
|
|
|
} |
|
|
|
if (ImGui::BeginMenu("Colors")) |
|
|
|
{ |
|
|
|
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0,0)); |
|
|
|
float sz = ImGui::GetTextLineHeight(); |
|
|
|
for (int i = 0; i < ImGuiCol_COUNT; i++) |
|
|
|
{ |
|
|
|
const char* name = ImGui::GetStyleColorName((ImGuiCol)i); |
|
|
|
ImGui::ColorButton(name, ImGui::GetStyleColorVec4((ImGuiCol)i)); |
|
|
|
ImVec2 p = ImGui::GetCursorScreenPos(); |
|
|
|
ImGui::GetWindowDrawList()->AddRectFilled(p, ImVec2(p.x+sz, p.y+sz), ImGui::GetColorU32((ImGuiCol)i)); |
|
|
|
ImGui::Dummy(ImVec2(sz, sz)); |
|
|
|
ImGui::SameLine(); |
|
|
|
ImGui::MenuItem(name); |
|
|
|
} |
|
|
|
ImGui::PopStyleVar(); |
|
|
|
ImGui::EndMenu(); |
|
|
|
} |
|
|
|
if (ImGui::BeginMenu("Disabled", false)) // Disabled
|
|
|
|