![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | rayohvv |
What’s the best way to have my buttons transition between normal/focused/hovered with a fade animation?
Preferably so I can choose which scenes this effect will happen on.
Maybe you can use the signals on the Texture Button to detect what kind of UI changed occurred (lost/gained focus, stopped hovering, pressed, etc etc) and animate a Texture Rect associated with the Texture Button (instead of directly animating the Texture Button, because I am not seeing how to directly animate the texture of a texture button without animating the whole button)
BigTuna675 | 2022-10-07 22:32
This works but I need it on a regular button, I don’t think it’s possible though
rayohvv | 2022-10-08 13:03
A regular button has the same signals as a texture button, and instead of using an icon for the button you can use a texture rect that is childed to the button, and handle the animations in your own way using an animation player
BigTuna675 | 2022-10-08 13:13
Oh wow that works perfectly thank you!
rayohvv | 2022-10-08 13:42
Awesome! That’s good to hear because when I first read your question I was pretty stumped to be honest. I’m going to add an answer now so this doesn’t appear in the “unanswered” section anymore
BigTuna675 | 2022-10-08 13:48