Skip to content

Commit

Permalink
Adjusted portrait touch handler to align with movement of icons away …
Browse files Browse the repository at this point in the history
…from corners.
  • Loading branch information
lanceewing committed Mar 19, 2024
1 parent 682744e commit 1b1e1cf
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -318,14 +318,14 @@ public boolean touchUp(int screenX, int screenY, int pointer, int button) {

if (viewportManager.isPortrait()) {
// Portrait.
if (touchXY.y < 125) {
if (touchXY.x < 116) {
if (touchXY.y < 130) {
if (touchXY.x < 126) {
joystickClicked = true;
} else if (touchXY.x > (viewportManager.getWidth() - 116)) {
} else if (touchXY.x > (viewportManager.getWidth() - 126)) {
backArrowClicked = true;
} else {
int midWidth = (int) (viewportManager.getWidth() - viewportManager.getWidth() / 2);
if ((touchXY.x > (midWidth - 58)) && (touchXY.y < (midWidth + 58))) {
if ((touchXY.x > (midWidth - 63)) && (touchXY.y < (midWidth + 63))) {
fullScreenClicked = true;
}
}
Expand Down

0 comments on commit 1b1e1cf

Please sign in to comment.