diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2019-12-18 23:12:35 +0100 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2019-12-18 23:12:35 +0100 |
commit | d15476388238f178e0062b50292a27f2984661a6 (patch) | |
tree | c459811efd1555503edee63f666ef19d72de852b /test/src/ch/asynk/gdx/boardgame | |
parent | be4e58bed776a68d5580f3ad01b3eb07dc628893 (diff) | |
download | gdx-boardgame-d15476388238f178e0062b50292a27f2984661a6.zip gdx-boardgame-d15476388238f178e0062b50292a27f2984661a6.tar.gz |
UiScreen : set ui.Scissors ready
Diffstat (limited to 'test/src/ch/asynk/gdx/boardgame')
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java | 2 | ||||
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/UiScreen.java | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java b/test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java index 1c1273a..4c51780 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java +++ b/test/src/ch/asynk/gdx/boardgame/test/AbstractScreen.java @@ -17,6 +17,7 @@ import com.badlogic.gdx.math.Vector2; import com.badlogic.gdx.math.Vector3; import ch.asynk.gdx.boardgame.ui.Root; +import ch.asynk.gdx.boardgame.ui.Scissors; public abstract class AbstractScreen implements Screen { @@ -106,6 +107,7 @@ public abstract class AbstractScreen implements Screen { GdxBoardTest.debug(dom, "dispose()"); batch.dispose(); + Scissors.clear(); } @Override public void show() diff --git a/test/src/ch/asynk/gdx/boardgame/test/UiScreen.java b/test/src/ch/asynk/gdx/boardgame/test/UiScreen.java index 6ce119e..cb5d164 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/UiScreen.java +++ b/test/src/ch/asynk/gdx/boardgame/test/UiScreen.java @@ -13,6 +13,7 @@ import ch.asynk.gdx.boardgame.ui.Button; import ch.asynk.gdx.boardgame.ui.Label; import ch.asynk.gdx.boardgame.ui.List; import ch.asynk.gdx.boardgame.ui.Patch; +import ch.asynk.gdx.boardgame.ui.Scissors; import ch.asynk.gdx.boardgame.utils.Collection; import ch.asynk.gdx.boardgame.utils.IterableArray; @@ -68,6 +69,7 @@ public class UiScreen extends AbstractScreen this.camera = new OrthographicCamera(); this.camera.position.set(bg.getWidth() / 2f, bg.getHeight() / 2f, 0); setState(State.POSITIONS); + Scissors.register(this.camera, this.batch); } private Button buildButton(BitmapFont font, NinePatch patch, int padding, int spacing, Alignment a, Alignment la) |