mirror of
https://github.com/Drezil/imgui.git
synced 2024-12-18 06:06:35 +00:00
ColorPicker: Don't use Alpha setting when enabling all 3 sliders (#346)
This commit is contained in:
parent
97bedd704c
commit
e79d7553b0
@ -9283,9 +9283,9 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl
|
|||||||
if (!(flags & ImGuiColorEditFlags_NoSliders))
|
if (!(flags & ImGuiColorEditFlags_NoSliders))
|
||||||
{
|
{
|
||||||
if ((flags & ImGuiColorEditFlags_ModeMask_) == 0)
|
if ((flags & ImGuiColorEditFlags_ModeMask_) == 0)
|
||||||
flags = ImGuiColorEditFlags_RGB | ImGuiColorEditFlags_HSV | ImGuiColorEditFlags_HEX;
|
|
||||||
ImGui::PushItemWidth((alpha ? bar1_pos_x : bar0_pos_x) + bars_width - picker_pos.x);
|
ImGui::PushItemWidth((alpha ? bar1_pos_x : bar0_pos_x) + bars_width - picker_pos.x);
|
||||||
ImGuiColorEditFlags sub_flags = (alpha ? ImGuiColorEditFlags_Alpha : 0) | ImGuiColorEditFlags_NoPicker | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_NoColorSquare;
|
ImGuiColorEditFlags sub_flags = (alpha ? ImGuiColorEditFlags_Alpha : 0) | ImGuiColorEditFlags_NoPicker | ImGuiColorEditFlags_NoOptions | ImGuiColorEditFlags_NoColorSquare;
|
||||||
|
flags |= ImGuiColorEditFlags_RGB | ImGuiColorEditFlags_HSV | ImGuiColorEditFlags_HEX;
|
||||||
if (flags & ImGuiColorEditFlags_RGB)
|
if (flags & ImGuiColorEditFlags_RGB)
|
||||||
value_changed |= ImGui::ColorEdit4("##rgb", col, sub_flags | ImGuiColorEditFlags_RGB);
|
value_changed |= ImGui::ColorEdit4("##rgb", col, sub_flags | ImGuiColorEditFlags_RGB);
|
||||||
if (flags & ImGuiColorEditFlags_HSV)
|
if (flags & ImGuiColorEditFlags_HSV)
|
||||||
|
Loading…
Reference in New Issue
Block a user