mirror of
https://github.com/Drezil/imgui.git
synced 2025-01-24 13:16:35 +00:00
ColorEdit: fixed weird ternary pattern that makes some compiler warning (fair)
This commit is contained in:
parent
d5d825debb
commit
479e532f18
@ -9301,7 +9301,10 @@ static void ColorEditOptionsPopup(ImGuiColorEditFlags flags, float* col)
|
|||||||
sprintf(buf, "(%d,%d,%d,%d)", cr, cg, cb, ca);
|
sprintf(buf, "(%d,%d,%d,%d)", cr, cg, cb, ca);
|
||||||
if (ImGui::Selectable(buf))
|
if (ImGui::Selectable(buf))
|
||||||
ImGui::SetClipboardText(buf);
|
ImGui::SetClipboardText(buf);
|
||||||
sprintf(buf, (flags & ImGuiColorEditFlags_NoAlpha) ? "0x%02X%02X%02X" : "0x%02X%02X%02X%02X", cr, cg, cb, ca);
|
if (flags & ImGuiColorEditFlags_NoAlpha)
|
||||||
|
sprintf(buf, "0x%02X%02X%02X", cr, cg, cb);
|
||||||
|
else
|
||||||
|
sprintf(buf, "0x%02X%02X%02X%02X", cr, cg, cb, ca);
|
||||||
if (ImGui::Selectable(buf))
|
if (ImGui::Selectable(buf))
|
||||||
ImGui::SetClipboardText(buf);
|
ImGui::SetClipboardText(buf);
|
||||||
ImGui::EndPopup();
|
ImGui::EndPopup();
|
||||||
|
Loading…
Reference in New Issue
Block a user