#Animated Sprites In GUI?

1 messages · Page 1 of 1 (latest)

undone ether
#

You'd have to animate them by changing the sprite trough code.
You can aid yourself with an AnimatedSprite2D or SpriteFrames resource and fetch the current texture from there.
AtlasTexture is perfect for a manual approach.

pale plank
#

AnimatedSprite2D doesn't fall into the auto-shaping of control boxes as far as I can tell though

undone ether
#

No, i mean that you simply fetch the texture from the AnimatedSprite and palce it in your TextureRect/NinePatchRect

pale plank
#

This whole control system is going to make me bald (not because it is bad I just keep fighting it at every turn and it won't tell me how to work for it)

undone ether
#

They are surprisingly limited.
They are meant to emulate OS UIs. Which are also pretty simple.

pale plank
#

like there is no property to access on the TextureRect to make it cycle through frames

undone ether
#

No, that is why you must change the texture trough code over time.

#

What i meant with the AnimatedSprite2D, is that you can just hide it and still select a texture from it over time.

#

But if you find it confusing, i recommend sticking with AtlasTexture

pale plank
#

I am just going to give up on trying to make hboxes and vboxes work because I don't think I am using them appropriately and wing it on a control node parenting an animatedsprite2d and pray