diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2018-10-01 10:54:20 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2018-10-01 10:54:20 +0200 |
commit | 3b54036ac38372acda158269a96a0f76d1c5ec7d (patch) | |
tree | fd62a3415ee03c685323f43e55665b5b4b6e3945 /test/src | |
parent | bd83dc974ec28788a44c430659a9d5701db4ef13 (diff) | |
download | gdx-boardgame-3b54036ac38372acda158269a96a0f76d1c5ec7d.zip gdx-boardgame-3b54036ac38372acda158269a96a0f76d1c5ec7d.tar.gz |
GameScreen : paused cannot block resize()
Diffstat (limited to 'test/src')
-rw-r--r-- | test/src/ch/asynk/gdx/board/test/GameScreen.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/src/ch/asynk/gdx/board/test/GameScreen.java b/test/src/ch/asynk/gdx/board/test/GameScreen.java index 3931a89..7f038d6 100644 --- a/test/src/ch/asynk/gdx/board/test/GameScreen.java +++ b/test/src/ch/asynk/gdx/board/test/GameScreen.java @@ -125,7 +125,6 @@ public class GameScreen implements Screen @Override public void resize(int width, int height) { - if (paused) return; GdxBoardTest.debug("GameScreen", String.format("resize (%d,%d)",width, height)); camera.updateViewport(width, height); hud.resize(camera.getHud().width, camera.getHud().height); @@ -143,11 +142,13 @@ public class GameScreen implements Screen @Override public void show() { GdxBoardTest.debug("GameScreen", "show()"); + paused = false; } @Override public void hide() { GdxBoardTest.debug("GameScreen", "hide()"); + paused = true; } @Override public void pause() @@ -159,8 +160,8 @@ public class GameScreen implements Screen @Override public void resume() { GdxBoardTest.debug("resume() "); - paused = false; resize(Gdx.graphics.getWidth(), Gdx.graphics.getHeight()); + paused = false; } private void zoom(float dz) |