ColorEdit: Preserve last saturation value when V=0. Disable Hue editing lock.

This workaround is no longer necessary because preserving hue value prevents it from resetting when it is edited in said condition.
This commit is contained in:
Rokas Kupstys
2020-01-06 16:15:59 +02:00
committed by omar
parent 5e2329b98e
commit 32c33c6659
2 changed files with 27 additions and 10 deletions

View File

@ -1121,6 +1121,7 @@ struct ImGuiContext
ImGuiID TempInputTextId; // Temporary text input when CTRL+clicking on a slider, etc.
ImGuiColorEditFlags ColorEditOptions; // Store user options for color edit widgets
float ColorEditLastHue; // Backup of last Hue associated to LastColor[3], so we can restore Hue in lossy RGB<>HSV round trips
float ColorEditLastSaturation; // Backup of last Saturation associated to LastColor[3], so we can restore Saturation in lossy RGB<>HSV round trips
float ColorEditLastColor[3];
ImVec4 ColorPickerRef; // Initial/reference color at the time of opening the color picker.
bool DragCurrentAccumDirty;