mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-03 03:50:06 +00:00
ColorEdit: Added ImGuiColorEditFlags_Float flag to display and edit drag values in 0.0..1.0 range instead of 0..255. (#346)
This commit is contained in:
parent
4def2ce339
commit
7b2d79cffd
3 changed files with 25 additions and 8 deletions
|
|
@ -669,6 +669,9 @@ void ImGui::ShowTestWindow(bool* p_open)
|
|||
ImGui::Text("Color widget with Alpha:");
|
||||
ImGui::ColorEdit4("MyColor##2", (float*)&color);
|
||||
|
||||
ImGui::Text("Color widget with Float Display:");
|
||||
ImGui::ColorEdit4("MyColor##2f", (float*)&color, ImGuiColorEditFlags_Float);
|
||||
|
||||
ImGui::Text("Color button only:");
|
||||
ImGui::SameLine(); ShowHelpMarker("With the ImGuiColorEditFlags_NoInputs flag you can hide all the slider/text inputs.\nWith the ImGuiColorEditFlags_NoLabel flag you can pass a non-empty label which will only be used for the tooltip and picker popup.");
|
||||
ImGui::ColorEdit4("MyColor##3", (float*)&color, ImGuiColorEditFlags_NoInputs|ImGuiColorEditFlags_NoLabel);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue