raysan5 / raygui

A simple and easy-to-use immediate-mode gui library
zlib License
3.26k stars 280 forks source link

Commonise GuiColorPanelHSV and GuiColorPanel logic and behavior #370

Closed LievenPetersen closed 5 months ago

LievenPetersen commented 5 months ago

As discussed in #366, I transferred the dragging out of bounds behavior to GuiColorPanelHSV() and called it inside GuiColorPanel(), which simplifies code quite a lot.

I did not modify the return values of any functions and instead used a workaround where I compare the HSV values before and after the call to GuiColrPanelHSV(). Thus the API is not changed.

Tested on Linux:

As best as I can tell, everything behaves the same, with the addition of the new dragging out of bounds behavior.

raysan5 commented 5 months ago

@LievenPetersen Thank you very much for this improvement! I just added a small review about naming conventions.

LievenPetersen commented 5 months ago

@LievenPetersen Thank you very much for this improvement! I just added a small review about naming conventions.

@raysan5 The naming issue is resolved now.

raysan5 commented 5 months ago

@LievenPetersen Nice! Thanks for the review! 🙂