From b85879c878bbf7cae47f1ab2722af7e07f00dd93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Tue, 30 Sep 2014 16:34:30 +0200 Subject: GameScreen: nothing really --- core/src/ch/asynk/tankontank/screens/GameScreen.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/ch/asynk/tankontank/screens/GameScreen.java b/core/src/ch/asynk/tankontank/screens/GameScreen.java index 2669e70..371eaa7 100644 --- a/core/src/ch/asynk/tankontank/screens/GameScreen.java +++ b/core/src/ch/asynk/tankontank/screens/GameScreen.java @@ -232,10 +232,12 @@ public class GameScreen implements Screen public void resize(int width, int height) { // Gdx.app.debug("GameScreen", "resize (" + width + "," + height + ")"); - hud.getViewport().update(width, height, true); + hud.getViewport().update(width, height); mapViewport.update(width, height); + maxZoomOut = Math.min((map.getWidth() / cam.viewportWidth), (map.getHeight() / cam.viewportHeight)); cam.zoom = MathUtils.clamp(cam.zoom, ZOOM_IN_MAX, maxZoomOut); + screenToViewport.set((cam.viewportWidth / width), (cam.viewportHeight / height)); } -- cgit v1.1-2-g2b99