diff --git a/assets/png/back_arrow.png b/assets/png/back_arrow.png index 3127141..2f97d66 100644 Binary files a/assets/png/back_arrow.png and b/assets/png/back_arrow.png differ diff --git a/assets/png/full_screen.png b/assets/png/full_screen.png index 1560d76..2b4d76c 100644 Binary files a/assets/png/full_screen.png and b/assets/png/full_screen.png differ diff --git a/assets/png/joystick_icon.png b/assets/png/joystick_icon.png index b6b5e8f..a26da27 100644 Binary files a/assets/png/joystick_icon.png and b/assets/png/joystick_icon.png differ diff --git a/assets/png/keyboard_icon.png b/assets/png/keyboard_icon.png index 265dcdb..ba1d308 100644 Binary files a/assets/png/keyboard_icon.png and b/assets/png/keyboard_icon.png differ diff --git a/core/src/main/java/com/agifans/agile/GameScreen.java b/core/src/main/java/com/agifans/agile/GameScreen.java index 65d332b..a400d10 100644 --- a/core/src/main/java/com/agifans/agile/GameScreen.java +++ b/core/src/main/java/com/agifans/agile/GameScreen.java @@ -5,7 +5,6 @@ import com.agifans.agile.ui.GameScreenInputProcessor; import com.agifans.agile.ui.KeyboardType; import com.agifans.agile.ui.ViewportManager; -import com.badlogic.gdx.Application.ApplicationType; import com.badlogic.gdx.Input.Keys; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.InputMultiplexer; @@ -115,8 +114,8 @@ public GameScreen(Agile agile, AgileRunner agileRunner, DialogHandler dialogHand fullScreenIcon = new Texture("png/full_screen.png"); // Create the portrait and landscape joystick touchpads. - portraitTouchpad = createTouchpad(200, 1080 - 200 - 15, 1920); - landscapeTouchpad = createTouchpad(150, 1920 - 150 - 15, 815); + portraitTouchpad = createTouchpad(200, 1080 - 200, 1920); + landscapeTouchpad = createTouchpad(150, 1920 - 150, 815); viewportManager = ViewportManager.getInstance(); @@ -289,14 +288,14 @@ private void draw(float delta) { batch.setColor(c.r, c.g, c.b, 0.5f); if (viewportManager.isPortrait()) { - batch.draw(joystickIcon, 0, 0); - batch.draw(fullScreenIcon, viewportManager.getWidth() - viewportManager.getWidth() / 2 - 70, 0); - batch.draw(backIcon, viewportManager.getWidth() - 145, 0); + batch.draw(joystickIcon, 4, 4); + batch.draw(fullScreenIcon, viewportManager.getWidth() - viewportManager.getWidth() / 2 - 48, 4); + batch.draw(backIcon, viewportManager.getWidth() - 98, 4); } else { - batch.draw(joystickIcon, 0, viewportManager.getHeight() - 140); - batch.draw(fullScreenIcon, viewportManager.getWidth() - 150, viewportManager.getHeight() - 140); - batch.draw(backIcon, viewportManager.getWidth() - 150, 0); - batch.draw(keyboardIcon, 0, 0); + batch.draw(joystickIcon, 0, viewportManager.getHeight() - 100); + batch.draw(fullScreenIcon, viewportManager.getWidth() - 100, viewportManager.getHeight() - 100); + batch.draw(backIcon, viewportManager.getWidth() - 100, 4); + batch.draw(keyboardIcon, 4, 4); } batch.end(); @@ -306,9 +305,9 @@ private void draw(float delta) { float joyX = 0; float joyY = 0; if (viewportManager.isPortrait()) { - // Top of keyboard is: 765 + 145 = 910. Touchpad is 200 high. + // Top of keyboard is: 765 + 120 = 910. Touchpad is 200 high. int agiScreenBase = (int)(viewportManager.getHeight() - (viewportManager.getWidth() / 1.32)); - int midBetweenKeybAndPic = ((agiScreenBase + 910) / 2); + int midBetweenKeybAndPic = ((agiScreenBase + 885) / 2); portraitTouchpad.setY(midBetweenKeybAndPic - 100); portraitTouchpadStage.act(delta); portraitTouchpadStage.draw(); 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 b0befea..4895cec 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 < 130) { - if (touchXY.x < 140) { + if (touchXY.y < 104) { + if (touchXY.x < 104) { joystickClicked = true; - } else if (touchXY.x > (viewportManager.getWidth() - 145)) { + } else if (touchXY.x > (viewportManager.getWidth() - 104)) { backArrowClicked = true; } else { int midWidth = (int) (viewportManager.getWidth() - viewportManager.getWidth() / 2); - if ((touchXY.x > (midWidth - 70)) && (touchXY.y < (midWidth + 70))) { + if ((touchXY.x > (midWidth - 52)) && (touchXY.y < (midWidth + 52))) { fullScreenClicked = true; } } @@ -333,16 +333,16 @@ public boolean touchUp(int screenX, int screenY, int pointer, int button) { } else { // Landscape. int screenTop = (int) viewportManager.getHeight(); - if (touchXY.y > (screenTop - 140)) { - if (touchXY.x < 140) { + if (touchXY.y > (screenTop - 104)) { + if (touchXY.x < 104) { joystickClicked = true; - } else if (touchXY.x > (viewportManager.getWidth() - 150)) { + } else if (touchXY.x > (viewportManager.getWidth() - 104)) { fullScreenClicked = true; } - } else if (touchXY.y < 140) { - if (touchXY.x > (viewportManager.getWidth() - 150)) { + } else if (touchXY.y < 104) { + if (touchXY.x > (viewportManager.getWidth() - 104)) { backArrowClicked = true; - } else if (touchXY.x < 140) { + } else if (touchXY.x < 104) { keyboardClicked = true; } } diff --git a/core/src/main/java/com/agifans/agile/ui/KeyboardType.java b/core/src/main/java/com/agifans/agile/ui/KeyboardType.java index 651d9c9..30395d8 100644 --- a/core/src/main/java/com/agifans/agile/ui/KeyboardType.java +++ b/core/src/main/java/com/agifans/agile/ui/KeyboardType.java @@ -70,7 +70,7 @@ public enum KeyboardType { }, "png/portrait_keyboard_lowercase.png", 0.6f, - 145, + 120, 0, 1, -1, @@ -86,7 +86,7 @@ public enum KeyboardType { }, "png/portrait_keyboard_uppercase.png", 0.6f, - 145, + 120, 0, 1, -1, @@ -102,7 +102,7 @@ public enum KeyboardType { }, "png/portrait_keyboard_punc_numbers.png", 0.6f, - 145, + 120, 0, 1, -1,