mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-26 13:37:00 +00:00
Demo: Tweaks.
This commit is contained in:
parent
58345b11e1
commit
e7e81b265d
@ -2135,8 +2135,15 @@ static void ShowExampleMenuFile()
|
|||||||
}
|
}
|
||||||
if (ImGui::BeginMenu("Colors"))
|
if (ImGui::BeginMenu("Colors"))
|
||||||
{
|
{
|
||||||
|
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0,0));
|
||||||
for (int i = 0; i < ImGuiCol_COUNT; i++)
|
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();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
if (ImGui::BeginMenu("Disabled", false)) // Disabled
|
if (ImGui::BeginMenu("Disabled", false)) // Disabled
|
||||||
|
Loading…
Reference in New Issue
Block a user