mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02: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:
@ -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);
|
||||
|
Reference in New Issue
Block a user