Making the gif animated

Hello, am trying to get my gif to move but when i put then as the background of a element (a panel for exemple) they simply act like normal image. What would be the best way to make my gif work?

If you mean a single GIF file with multiple frames, this is outside of the scope of tonegodGUI really which uses JMEs asset system to load images as textures, which doesn’t have support for animated GIF files (or MNG/APNG for that matter).

You’ll have to roll your own. There are some ideas here.

1 Like

Alright fair enouf, thank.

Also how can i change the image when i set it as a background of one of my element. Right now am trying to set the image of a label to a hourglass, then when the ping from the server come back it becaume a green/red light, all depending how the server respond. But i can’t find any setImage or setBackground in the label method.

Ah, you need Element.setColorMap(). Oddly enough, today I posted a little example showing this in a previous thread.

1 Like

Yep! Working great! Thanks again!

This link is died. Can you or someone give a new link please?

I edited the link

I say that about another link but thanks anyway :slight_smile:

oh… I fixed it too