Refactor ColorPicker shapes#99515
Conversation
029beba to
04e059f
Compare
|
I reimplemented the input. The shapes should behave the same as before. I'll be probably changing the shapes to be Object, because the current code is far from ideal and the little saved memory is not worth it. |
42c56a6 to
dd5783d
Compare
|
Rebased. There were many changes to ColorPicker in the meantime, hopefully I didn't accidentally revert anything. |
1c17182 to
bcafac0
Compare
There was a problem hiding this comment.
Tested locally (in the editor and a minimal project), it mostly works as expected.
I spotted one functional regression though. ColorPickerButton with the OKHSL slider mode (not the color wheel mode) will have the color wheel disappear entirely, while a standalone ColorPicker with the same setting is fine.
| Before | After |
|---|---|
![]() |
![]() |
|
Good catch, fixed. |
|
Thanks! |



Closes godotengine/godot-proposals#4353
Basically #62075, but for picker shapes.
Adds a new class ColorPickerShape, which is an abstraction of picker shapes (similar to ColorMode). This allows to split some behemoth methods into a more manageable pieces. For now I removed the huge
_hsv_draw()method, which had entangled code for drawing every piece of ColorPicker. Now each part has its own method. The shapes should appear as before.