mirror of
https://github.com/ocornut/imgui.git
synced 2024-11-12 02:00:58 +01:00
Merge pull request #1277 from luk1337/master
ColorPicker: Fix broken ImGuiColorEditFlags_NoAlpha flag check - not restoring Alpha when clicking on reference color.
This commit is contained in:
commit
41076188ca
@ -9292,7 +9292,7 @@ static void ColorPickerOptionsPopup(ImGuiColorEditFlags flags, float* ref_col)
|
||||
g.ColorEditOptions = (g.ColorEditOptions & ~ImGuiColorEditFlags__PickerMask) | (picker_flags & ImGuiColorEditFlags__PickerMask);
|
||||
ImGui::SetCursorScreenPos(backup_pos);
|
||||
ImVec4 dummy_ref_col;
|
||||
memcpy(&dummy_ref_col.x, ref_col, sizeof(float) * (ImGuiColorEditFlags_NoAlpha ? 3 : 4));
|
||||
memcpy(&dummy_ref_col.x, ref_col, sizeof(float) * (picker_flags & ImGuiColorEditFlags_NoAlpha ? 3 : 4));
|
||||
ImGui::ColorPicker4("##dummypicker", &dummy_ref_col.x, picker_flags);
|
||||
ImGui::PopID();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user