Nifty screen resolution

Hey

how can i change a screen resolution. I write a gui with many resolution for many computer resolution. How can i set it.
I try:
[java]this.getContext().getSettings().setResolution(480, 800);[/java]
but nothing happen,
i can get the resolution with:
[java]System.out.println("W: β€œ+ nifty.getRenderEngine().getNativeWidth() + " H:”+nifty.getRenderEngine().getNativeHeight());
[/java]
but not set it

If you design your screen at a certain resolution (1280, 720) for instance, then call:

[java]nifty.enableAutoScaling(1280, 720);[/java]

It will automatically scale the nifty screen to fit any resolution!

2 Likes
@emoleumassi said: Hey

how can i change a screen resolution. I write a gui with many resolution for many computer resolution. How can i set it.
I try:
[java]this.getContext().getSettings().setResolution(480, 800);[/java]
but nothing happen,
i can get the resolution with: W: 1678 H:1021
[java]System.out.println("W: β€œ+ nifty.getRenderEngine().getNativeWidth() + " H:”+nifty.getRenderEngine().getNativeHeight());
[/java]
but can’t set it