-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
TextureButton doesn't show Pressed image when clicked in V3.4 like it did in V3.3 stable #55146
Comments
This comment has been minimized.
This comment has been minimized.
You didn't assign the Focused image. |
Edit: seems like a duplicate of #3926.
Right, didn't read careful enough. In fact, I didn't assign a single texture, just run the minimal reproduction project. So you're right. It's indeed reproducible without a problem. But you're not right about it working differently in Relevant source code (click to expand)
So to make it clear: when you're pressing the button |
I dunno, I gave out a demo of my game built with Godot_v3.3-stable_win64.exe and it worked before. Hmm you're right though, somehow it didn't save the Focused image in my test project. Doh. Thank you for the workaround! |
The Focused texture is meant to be an overlay over existing images, so that the focused state can be indicated regardless of the current button's state. The same also applies to Button. This is expected behavior, closing. If you don't want the focus texture to get in the way, use an empty texture for the focused style. However, this will harm keyboard/controller menu navigation since there will no longer be visual feedback for the currently focused menu item. |
@Calinou I don't see anything about it in the |
Still nothing in the docs, please give some info on this there. Took me way too long to find this issue in order to find out what's going on. |
This is already documented in the class reference: #55165 I've opened a PR to document this in the manual, but I couldn't find a great location for the added note: godotengine/godot-docs#10313 Also, implementing godotengine/godot-proposals#6577 would address the original problem mentioned here. |
Godot version
3.4 stable
System information
Win10, 3080
Issue description
When a normal (toggle mode is false) TextureButton is clicked, the Pressed image should show as long as the mouse is still over the button and left mouse is held down.
This last worked in V3.3 stable
Steps to reproduce
Make TextureButton in test scene
Ensure toggle mode is false
Add textures for Normal, Pressed, Hover, Focus
Run scene
Click and hold down button, it always shows Focus and never Pressed
Minimal reproduction project
TextureButton.zip
The text was updated successfully, but these errors were encountered: