-
-
Notifications
You must be signed in to change notification settings - Fork 21.2k
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
Color picked from screen doesn't immediately update the button #62858
Comments
I can reproduce this and have seen this bug when using the color picker. |
Because when sampling, the signal is emitted when the LMB is released, but the internal PopupPanel closes when the LMB is pressed. So when sampling, the |
I believe the problem appeared with a change to how the popup/viewport works. Even with the This could be worked around by adding a godot/scene/gui/color_picker.cpp Lines 103 to 107 in d26442e
But there's probably a better way of doing that? I tried to fix it more cleanly by creating a new fullscreen popup with a transparent background, but I didn't manage to do this, the background always appeared black. |
New popup won't work, because you won't be able to sample what's underneath. Also popups can't be transparent, because they are separate windows (unless embedded). |
I'm a little curious about how the screenshot tool/screen recording tool works. Get the image behind the window and draw inside the front window to simulate transparent? |
This describes how the screen tool works.
The screen recording tool uses another path. |
I'm looking at this right now, I think it happens because _screen_input never gets a valid InputEventMouseButton:
Which leads to that it never emits the color_changed event. Couldn't figure out what's causing it, might continue with it tomorrow unless someone else fixes it faster. edit: Was a bit tired and stressed yesterday, didn't see that other comments were already saying this |
@MinusKube added your suggested workaround to a PR. I think fixing it for now is preferable to holding off for a proper solution. |
This appears to be fixed in |
Godot version
d26442e
System information
Windows 10 x64
Issue description
Probably some signal isn't emitted.
Steps to reproduce
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: