Hello, I would like to know how update the position of a nifty when I change the size of my fenetre?
Thanks to you
Whats a fenetre? o_O
A window
Thanks normen
I still don’t know what this question means … but I guess it’s a request for Nifty to automatically adjust itself to the new window size, right?
Probably using some magic rescale of the GUI? I’d suggest waiting just a little bit more in that case …
Sorry for “fenetre” yes it’s a window ^^
My nifty position was with %
but when i resize my window, my panel don’t move
I’m not sure if resizing the window is forwarded to Nifty (using RenderDevice getWidth() and getHeight() methods) currently. Maybe there is a missing nifty.resolutionChanged() call somewhere inside of jme?
Do you have a chance to add a listener to the window size so that you could call nifty.resolutionChanged() on your own as a workaround?
Nifty simply caches the screensize that RenderDevice getWidth() and getHeight() returned internally but it should refresh everything on the screen according to the new size when nifty.resolutionChanged() is being called. I think no one has ever tried that yet tho
I did not know the function nifty.resolutionChanged() thank you I will try tomorrow!