Skip to content

Commit

Permalink
Moved icons away from corner slightly for portrait mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
lanceewing committed Mar 19, 2024
1 parent 354b09f commit 682744e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions core/src/main/java/com/agifans/agile/GameScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,9 @@ private void draw(float delta) {
batch.setColor(c.r, c.g, c.b, 0.5f);
if (viewportManager.isPortrait()) {
// Portrait
batch.draw(joystickIcon, 10, 15);
batch.draw(fullScreenIcon, viewportManager.getWidth() - viewportManager.getWidth() / 2 - 48, 15);
batch.draw(backIcon, viewportManager.getWidth() - 106, 15);
batch.draw(joystickIcon, 20, 20);
batch.draw(fullScreenIcon, viewportManager.getWidth() - viewportManager.getWidth() / 2 - 48, 20);
batch.draw(backIcon, viewportManager.getWidth() - 116, 20);
} else {
// Landscape
batch.draw(joystickIcon, 8, viewportManager.getHeight() - 104);
Expand All @@ -305,10 +305,10 @@ private void draw(float delta) {
float joyX = 0;
float joyY = 0;
if (viewportManager.isPortrait()) {
// Top of keyboard is: 765 + 125 = 890.
// Top of keyboard is: 765 + 130 = 895.
int joyWidth = 200;
int agiScreenBase = (int)(viewportManager.getHeight() - (viewportManager.getWidth() / 1.32));
int midBetweenKeybAndPic = ((agiScreenBase + 890) / 2);
int midBetweenKeybAndPic = ((agiScreenBase + 895) / 2);
portraitTouchpad.setSize(joyWidth, joyWidth);
portraitTouchpad.setY(midBetweenKeybAndPic - (joyWidth / 2));
portraitTouchpad.setX(1080 - joyWidth - 10);
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,
125,
130,
0,
1,
-1,
Expand All @@ -86,7 +86,7 @@ public enum KeyboardType {
},
"png/portrait_keyboard_uppercase.png",
0.6f,
125,
130,
0,
1,
-1,
Expand All @@ -102,7 +102,7 @@ public enum KeyboardType {
},
"png/portrait_keyboard_punc_numbers.png",
0.6f,
125,
130,
0,
1,
-1,
Expand Down

0 comments on commit 682744e

Please sign in to comment.