Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | SasQ | |
Old Version | Published before Godot 3 was released. |
Is there any way in Godot to use an animated sprite as a GUI control?
E.g. playing some frame-by-frame sprite animation when a button is being hovered by the mouse pointer.
I checked out Button
and TextureButton
, but they don’t seem to have any means for animating the textures. They can only use static images for the different states of the button
On the other hand, Godot’s developers in their infinite intelligence didn’t derive Sprite
and AnimatedSprite
from Control
;` so they lack the typical functionality of a GUI control, like handling user input or layout
Is there any way around this?
Maybe making a custom control extending one of the control classes that would use a Sprite
or AnimatedSprite
for displaying itself?