So I’m adding a map to the app I’m writing. As the user wanders around the map fills in.
Internally, I’ve created a buffered image. When the user asks to display the map, the code that creates the map executes. A quick outline:
Create a new bufferedimage.
Loop over the terrain. If it’s been explored, add a dot to the bufferedimage depending on area characteristics.
Save the bufferedimage.
Load it into a Picture for use as a GUI element.
The issue is that this works once. After that, using Picture.setImage() always returns the first image. I’m assuming that the asset manager is caching the images for efficiency.
Is there a better way to do this?
Again, thanks in advance for the help!
Perfect! Thank you.
And as an aside to anyone else that finds this thread, remember to call the .setTexture function after each user update of the picture.