How to preload a GUI image?

I am using the “AssetsManager” class to load all my resources so I can have them right away when I need them instead of having to wait for the download.

I wanted to do the same with the UI and I used the method addImageTask of the AssetsManager but it gave me an HTMLImage Element instead of a GUI Image.

How do I convert it to an GUI Image? (or better yet, how do I preload a UI Image?)

Hello you can create a GUI Image and set the HTMLImage to it like that:

guiImage.domImage = htmlImage
1 Like