[Solved] Change nifty picture size

hey,

Is there a good way to change the size of a picture in nifty for a life indicator?

Or do I have to make 100 pictures for for every percent?

http://freefr.dl.sourceforge.net/project/nifty-gui/nifty-gui/nifty-gui-the-manual-v1.0.pdf

look for image resizing

I want to resize the image in java and not the way they discribe it in the manual.

If the player loses life i want to change it in the hud in java - is there a way to do so?

I can change the image to another image but not resize it.

element.setConstraintWidth(new SizeValue(“100px”));

element.getParent().layoutElements();



This example should give more info:

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:loading_screen

1 Like

thanks