resize main page widget position changed

This commit is contained in:
2018-01-15 18:36:23 -06:00
parent 7ca69899b3
commit bdbb6f7fd4
3 changed files with 6 additions and 3 deletions

View File

@@ -97,6 +97,7 @@ public class RhythmBullet extends Game {
queueAssets();
setScreen(initialScreen);
screenWidth = Gdx.graphics.getWidth();
screenHeight = Gdx.graphics.getHeight();
}
@@ -160,7 +161,10 @@ public class RhythmBullet extends Game {
@Override
public void resize(int width, int height) {
Gdx.app.debug("RhythmBullet/resize", "Previous size:" + screenWidth + "x" + screenHeight + " new size: " + width + "x" + height);
if (width != screenWidth || height != screenHeight) {
screenWidth = Gdx.graphics.getWidth();
screenHeight = Gdx.graphics.getHeight();
if (initComplete) {
Gdx.app.debug("Resize", "Pre-transition is happening. Using resolution " + width + "x" + height);
rRHandler.setResolution(width, height);