summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk/zproject/screens
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2018-07-06 12:14:41 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2018-07-06 12:14:41 +0200
commit21405a878478592281e077981c2d155b2c5af36f (patch)
tree731545c583b0bf4da426098c63b215603d5ed1dc /core/src/ch/asynk/zproject/screens
parentc4f8ea5d16db402dd300d22b5e4795586068204c (diff)
downloadgdx-boardgame-21405a878478592281e077981c2d155b2c5af36f.zip
gdx-boardgame-21405a878478592281e077981c2d155b2c5af36f.tar.gz
GameScreen : do not pass a Rectangle on draw, use resize if needed
Diffstat (limited to 'core/src/ch/asynk/zproject/screens')
-rw-r--r--core/src/ch/asynk/zproject/screens/GameScreen.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/src/ch/asynk/zproject/screens/GameScreen.java b/core/src/ch/asynk/zproject/screens/GameScreen.java
index 8447f12..606c7c3 100644
--- a/core/src/ch/asynk/zproject/screens/GameScreen.java
+++ b/core/src/ch/asynk/zproject/screens/GameScreen.java
@@ -66,13 +66,13 @@ public class GameScreen implements Screen
camera.applyMapViewport();
batch.setProjectionMatrix(camera.combined);
batch.begin();
- board.draw(batch, camera.getViewport());
+ board.draw(batch);
batch.end();
camera.applyHudViewport();
batch.setProjectionMatrix(camera.getHudMatrix());
batch.begin();
- hud.draw(batch, camera.getHud());
+ hud.draw(batch);
batch.end();
}
@@ -81,6 +81,7 @@ public class GameScreen implements Screen
if (paused) return;
ZProject.debug("GameScreen", String.format("resize (%d,%d)",width, height));
camera.updateViewport(width, height);
+ hud.resize(camera.getHud().width, camera.getHud().height);
}
@Override public void dispose()