In my game, I added animation for button selection (link to tutorial - ""), and I also made it possible to select buttons using physical keys (link to tutorial - ""). But unfortunately, they don't work together, and the hover animation only plays when I hover the mouse cursor and doesn't show up during physical selection. How can I fix this?
How can I add a hover animation for buttons during selection using physical key?
- Best Answerset by Scel
You can use the has_focus()
method to check if a control
has focus:
https://docs.godotengine.org/en/stable/classes/class_control.html#class-control-method-has-focus
bool has_focus() const
Returns true if this is the current focused control. See focus_mode.
Jesusemora , THANK YOU VERY MUCH!!! ITS WORK!!!