From d54144dc359cdf9e133012a7f1f7fb24ec964558 Mon Sep 17 00:00:00 2001 From: Lance Ewing Date: Mon, 18 Mar 2024 20:43:04 +0000 Subject: [PATCH] Updated game screen touch handler to reflect new icon placement. --- .../agile/ui/GameScreenInputProcessor.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/core/src/main/java/com/agifans/agile/ui/GameScreenInputProcessor.java b/core/src/main/java/com/agifans/agile/ui/GameScreenInputProcessor.java index 4895cec..3e02d88 100644 --- a/core/src/main/java/com/agifans/agile/ui/GameScreenInputProcessor.java +++ b/core/src/main/java/com/agifans/agile/ui/GameScreenInputProcessor.java @@ -318,14 +318,14 @@ public boolean touchUp(int screenX, int screenY, int pointer, int button) { if (viewportManager.isPortrait()) { // Portrait. - if (touchXY.y < 104) { - if (touchXY.x < 104) { + if (touchXY.y < 125) { + if (touchXY.x < 116) { joystickClicked = true; - } else if (touchXY.x > (viewportManager.getWidth() - 104)) { + } else if (touchXY.x > (viewportManager.getWidth() - 116)) { backArrowClicked = true; } else { int midWidth = (int) (viewportManager.getWidth() - viewportManager.getWidth() / 2); - if ((touchXY.x > (midWidth - 52)) && (touchXY.y < (midWidth + 52))) { + if ((touchXY.x > (midWidth - 58)) && (touchXY.y < (midWidth + 58))) { fullScreenClicked = true; } } @@ -334,15 +334,15 @@ public boolean touchUp(int screenX, int screenY, int pointer, int button) { // Landscape. int screenTop = (int) viewportManager.getHeight(); if (touchXY.y > (screenTop - 104)) { - if (touchXY.x < 104) { + if (touchXY.x < 112) { joystickClicked = true; - } else if (touchXY.x > (viewportManager.getWidth() - 104)) { + } else if (touchXY.x > (viewportManager.getWidth() - 112)) { fullScreenClicked = true; } } else if (touchXY.y < 104) { - if (touchXY.x > (viewportManager.getWidth() - 104)) { + if (touchXY.x > (viewportManager.getWidth() - 112)) { backArrowClicked = true; - } else if (touchXY.x < 104) { + } else if (touchXY.x < 112) { keyboardClicked = true; } }