godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
91.38k stars 21.26k forks source link

Refactor ColorPicker shapes #99515

Open KoBeWi opened 3 days ago

KoBeWi commented 3 days ago

Closes https://github.com/godotengine/godot-proposals/issues/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.

TODO: