From 3b54036ac38372acda158269a96a0f76d1c5ec7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Mon, 1 Oct 2018 10:54:20 +0200 Subject: GameScreen : paused cannot block resize() --- test/src/ch/asynk/gdx/board/test/GameScreen.java | 5 +++-- 1 file 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) -- cgit v1.1-2-g2b99