-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Display the old color in ColorPicker for easier comparison #34840
Display the old color in ColorPicker for easier comparison #34840
Conversation
In hopes for this to get merged before 3.2.3 release maybe worth resolving the conflicting file? 🙂 |
9ab9064
to
5b377d6
Compare
@pycbouh Good catch, but I'd prefer adding the border in a separate PR. This issue is present without the change provided by this PR anyway. |
I think it will be better when clicking on the old color box. And the color will reset to an old one. This should help those who pick the wrong color and don't want to close a modal. |
5b377d6
to
93a61f5
Compare
Rebased and tested again:
This is a good idea, but I'll leave it for a future pull request. Edit: Pull request opened: #48618 |
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.
Yep, still works both in editor and in projects. Though, I've missed this initially:
This only affects ColorPickerButton nodes that spawn a ColorPicker, not standalone ColorPickers.
Why don't we expose that for any ColorPicker? Not even as an option. The API is sound, it can be exposed to the user, I think.
We can do it in another PR, I'm just not sure why the limitation is here in the first place.
Unlike ColorPickerButtons which let you toggle the ColorPicker's visibility, standalone ColorPickers are always visible by default. Therefore, we'd need to define some API to reset the old color (or manually set it to an arbitrary value). |
Yes, and you've defined it already 🙂 void ColorPicker::set_old_color(const Color &p_color) {
old_color = p_color;
} |
@pycbouh It should be easy to expose those methods, but I'd still leave it to a future PR to ensure we can get everything right (including hiding the Old Color property in the inspector when the Display Old Color property is unchecked). |
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.
Aside from that one comment I left it looks ok.
93a61f5
to
13e5637
Compare
This only affects ColorPickerButton nodes that spawn a ColorPicker, not standalone ColorPickers. This partially addresses godotengine#7366.
13e5637
to
9e1bfe2
Compare
Thanks! |
This would need a dedicated PR to backport to |
master
version of #48611.This only affects ColorPickerButton nodes that spawn a ColorPicker, not standalone ColorPickers. The old color is on the left, the new color is on the right.
This partially addresses #7366.
Preview