|
|
@ -9433,12 +9433,12 @@ bool ImGui::ColorPicker4(const char* label, float col[4], ImGuiColorEditFlags fl
|
|
|
|
float square_sz = ColorSquareSize();
|
|
|
|
float square_sz = ColorSquareSize();
|
|
|
|
if ((flags & ImGuiColorEditFlags_NoLabel))
|
|
|
|
if ((flags & ImGuiColorEditFlags_NoLabel))
|
|
|
|
Text("Current");
|
|
|
|
Text("Current");
|
|
|
|
ColorButton("##current", col_v4, (flags & (ImGuiColorEditFlags_AlphaPreview|ImGuiColorEditFlags_AlphaPreviewHalf)), ImVec2(square_sz * 3, square_sz * 2));
|
|
|
|
ColorButton("##current", col_v4, (flags & (ImGuiColorEditFlags_AlphaPreview|ImGuiColorEditFlags_AlphaPreviewHalf|ImGuiColorEditFlags_NoTooltip)), ImVec2(square_sz * 3, square_sz * 2));
|
|
|
|
if (ref_col != NULL)
|
|
|
|
if (ref_col != NULL)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Text("Original");
|
|
|
|
Text("Original");
|
|
|
|
ImVec4 ref_col_v4(ref_col[0], ref_col[1], ref_col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : ref_col[3]);
|
|
|
|
ImVec4 ref_col_v4(ref_col[0], ref_col[1], ref_col[2], (flags & ImGuiColorEditFlags_NoAlpha) ? 1.0f : ref_col[3]);
|
|
|
|
if (ColorButton("##original", ref_col_v4, (flags & (ImGuiColorEditFlags_AlphaPreview|ImGuiColorEditFlags_AlphaPreviewHalf)), ImVec2(square_sz * 3, square_sz * 2)))
|
|
|
|
if (ColorButton("##original", ref_col_v4, (flags & (ImGuiColorEditFlags_AlphaPreview|ImGuiColorEditFlags_AlphaPreviewHalf|ImGuiColorEditFlags_NoTooltip)), ImVec2(square_sz * 3, square_sz * 2)))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
memcpy(col, ref_col, ((flags & ImGuiColorEditFlags_NoAlpha) ? 3 : 4) * sizeof(float));
|
|
|
|
memcpy(col, ref_col, ((flags & ImGuiColorEditFlags_NoAlpha) ? 3 : 4) * sizeof(float));
|
|
|
|
value_changed = true;
|
|
|
|
value_changed = true;
|
|
|
|