Skip to content

Commit

Permalink
Moving the keyboard up slightly in portrait mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanceewing committed Mar 19, 2024
1 parent 1b1e1cf commit c8e470f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions core/src/main/java/com/agifans/agile/GameScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,10 @@ private void draw(float delta) {
float joyX = 0;
float joyY = 0;
if (viewportManager.isPortrait()) {
// Top of keyboard is: 765 + 130 = 895.
// Top of keyboard is: 765 + 135 = 900.
int joyWidth = 200;
int agiScreenBase = (int)(viewportManager.getHeight() - (viewportManager.getWidth() / 1.32));
int midBetweenKeybAndPic = ((agiScreenBase + 895) / 2);
int midBetweenKeybAndPic = ((agiScreenBase + 900) / 2);
portraitTouchpad.setSize(joyWidth, joyWidth);
portraitTouchpad.setY(midBetweenKeybAndPic - (joyWidth / 2));
portraitTouchpad.setX(1080 - joyWidth - 10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ public boolean touchUp(int screenX, int screenY, int pointer, int button) {

if (viewportManager.isPortrait()) {
// Portrait.
if (touchXY.y < 130) {
if (touchXY.y < 135) {
if (touchXY.x < 126) {
joystickClicked = true;
} else if (touchXY.x > (viewportManager.getWidth() - 126)) {
Expand Down
6 changes: 3 additions & 3 deletions core/src/main/java/com/agifans/agile/ui/KeyboardType.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public enum KeyboardType {
},
"png/portrait_keyboard_lowercase.png",
0.6f,
130,
135,
0,
1,
-1,
Expand All @@ -86,7 +86,7 @@ public enum KeyboardType {
},
"png/portrait_keyboard_uppercase.png",
0.6f,
130,
135,
0,
1,
-1,
Expand All @@ -102,7 +102,7 @@ public enum KeyboardType {
},
"png/portrait_keyboard_punc_numbers.png",
0.6f,
130,
135,
0,
1,
-1,
Expand Down

0 comments on commit c8e470f

Please sign in to comment.