diff options
Diffstat (limited to 'test/src/ch/asynk/gdx')
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java | 2 | ||||
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/MenuScreen.java | 4 | ||||
-rw-r--r-- | test/src/ch/asynk/gdx/boardgame/test/UiScreen.java | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java b/test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java index 5357449..f609f2c 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java +++ b/test/src/ch/asynk/gdx/boardgame/test/BoardScreen.java @@ -218,7 +218,7 @@ public class BoardScreen extends AbstractScreen { cam.unproject(x, y, boardTouch); cam.unprojectHud(x, y, hudTouch); - if (btn.touch(hudTouch.x, hudTouch.y)) { + if (btn.touch(hudTouch.x, hudTouch.y) != null) { setState(state.next()); } else { board.touch(boardTouch.x, boardTouch.y); diff --git a/test/src/ch/asynk/gdx/boardgame/test/MenuScreen.java b/test/src/ch/asynk/gdx/boardgame/test/MenuScreen.java index 23887f6..b0a312a 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/MenuScreen.java +++ b/test/src/ch/asynk/gdx/boardgame/test/MenuScreen.java @@ -73,8 +73,10 @@ public class MenuScreen extends AbstractScreen { hudTouch.set(x, y, 0); camera.unproject(hudTouch); - if (root.touch(hudTouch.x, hudTouch.y)) { + if (root.touch(hudTouch.x, hudTouch.y) != root) { switch(menu.touched()) { + case -1: + break; case 0: app.switchToUi(); break; diff --git a/test/src/ch/asynk/gdx/boardgame/test/UiScreen.java b/test/src/ch/asynk/gdx/boardgame/test/UiScreen.java index e0fcaf4..bdd8b88 100644 --- a/test/src/ch/asynk/gdx/boardgame/test/UiScreen.java +++ b/test/src/ch/asynk/gdx/boardgame/test/UiScreen.java @@ -134,10 +134,8 @@ public class UiScreen extends AbstractScreen { hudTouch.set(x, y, 0); camera.unproject(hudTouch); - if (root.touch(hudTouch.x, hudTouch.y)) { - if (root.touched() == next) - setState(state.next()); - } + if (root.touch(hudTouch.x, hudTouch.y) == next) + setState(state.next()); } @Override protected void onDragged(int dx, int dy) { @@ -213,7 +211,7 @@ class MyList extends Patch scrollable.setPosition(getInnerX(), getInnerY(), getInnerWidth(), getInnerHeight() - title.getHeight() - 15); } - @Override public boolean touch(float x, float y) + @Override public Element touch(float x, float y) { return scrollable.touch(x, y); } |