-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modularize the Color Picker via properties and new picker mode. #67741
Conversation
518dc6c
to
508ec88
Compare
Seems like the XML documentation is missing the |
508ec88
to
cefb6c7
Compare
Thanks for the catch. Updated. |
cefb6c7
to
8c8777e
Compare
New push to fix property ordering (actually using |
I tested this and it's overall good. But I have a few notes:
|
8c8777e
to
8d385f0
Compare
Updated per @KoBeWi's review:
Outstanding:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left some minor comments, but otherwise looks ok.
As for the can_add_swatches
property, its removal can still be discussed and done in another PR. But with the changes here, it's possible to make a ColorPicker that contains only swatches, so disabling the button might make sense. But maybe it would be better if the property was hiding it, idk
8d385f0
to
286e7da
Compare
Thanks @KoBeWi! All outstanding comments have been resolved. |
Thanks! And congrats for your first merged Godot contribution 🎉 |
As noted in #67663, the new color picker removed some flexibility. The new options are great, but limited how we could use the control in game.
Inspired by this, I took a stab at giving full flexibility in the color picker. Properties are exposed to hide all elements outside the picker itself, which can also be disabled with a new Picker Mode.
The existing
presets_visible
property was no longer respected (launching with it enabled still hid the presets until Swatches was clicked) so I used that to hide the Swatches and Recent Colors buttons.Similarly, after the new UX
presets_enabled
worked correctly, but was confusing as internally both recent colors and swatches are considered presets. I changed the name of this property tocan_add_swatches
.The picker itself is a fantastic control and the hope is to make it helpful in more scenarios with additional customization options.
Bugsquad edit: