summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2014-09-30 16:34:30 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2014-09-30 16:34:30 +0200
commitb85879c878bbf7cae47f1ab2722af7e07f00dd93 (patch)
treec6569c45a19dd7229f1c7f1d7825bc675066e91a
parent5add1674ee031eaada9d19d07dde5efbd071b4f0 (diff)
downloadRustAndDust-b85879c878bbf7cae47f1ab2722af7e07f00dd93.zip
RustAndDust-b85879c878bbf7cae47f1ab2722af7e07f00dd93.tar.gz
GameScreen: nothing really
-rw-r--r--core/src/ch/asynk/tankontank/screens/GameScreen.java4
1 files changed, 3 insertions, 1 deletions
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));
}