We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be5d87d commit e80bb2aCopy full SHA for e80bb2a
blade-engine/src/com/bladecoder/engine/ui/HelpScreen.java
@@ -95,11 +95,12 @@ public void render(float delta) {
95
public void resize(int width, int height) {
96
97
float aspect = width / height;
98
+ float bgAspect = (float)tex.getWidth() / (float)tex.getHeight();
99
- if(aspect < 16f/9f)
100
- viewport.setWorldSize(width, (int)(width * 9f/16f));
+ if(aspect < bgAspect)
101
+ viewport.setWorldSize(width, (int)(width / bgAspect));
102
else
- viewport.setWorldSize((int)(height * 16f/9f), height);
103
+ viewport.setWorldSize((int)(height * bgAspect), height);
104
105
viewport.update(width, height, true);
106
}
0 commit comments