Bring the title screen's intro and corners into line

The intro now comes in in reading order, one Main Menu stagger apart.
The account chip is as tall as the quit button, with a smaller head and
name, both sitting a little tighter in the top corners, and the Saturn
dock item opens the shift menu.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-09-28 19:39:39 +02:00
co-authored by claude
parent a7ad458627
commit adedd688a7
2 changed files with 45 additions and 27 deletions
@@ -15,12 +15,13 @@ import org.saturnclient.ui.resources.Fonts;
* while connected to Saturn.
*/
public class AccountChip extends Element {
public static final int HEIGHT = 40;
public static final int HEIGHT = 32;
private static final int HEAD = 28;
private static final int PADDING = 6;
private static final int DOT = 7;
private static final float NAME_SCALE = 0.7f;
private static final int HEAD = 18;
private static final int PADDING = 7;
private static final int GAP = 8;
private static final int DOT = 6;
private static final float NAME_SCALE = 0.55f;
private static final int CONNECTED = 0xFF7FD1A8;
private final String name;
@@ -29,7 +30,8 @@ public class AccountChip extends Element {
String username = Providers.saturn.getClient().getUsername();
this.name = username != null ? username : "Player";
this.height = HEIGHT;
this.width = PADDING + HEAD + 10 + (int) (Fonts.getWidth(name, Theme.FONT.value) * NAME_SCALE) + 10 + DOT + 12;
this.width = PADDING + HEAD + GAP + (int) (Fonts.getWidth(name, Theme.FONT.value) * NAME_SCALE) + GAP + DOT
+ GAP + 2;
}
@Override
@@ -43,11 +45,11 @@ public class AccountChip extends Element {
renderScope.drawTexture(skin, PADDING, headY, 8, 8, HEAD, HEAD, 8, 8, 64, 64);
renderScope.drawTexture(skin, PADDING, headY, 40, 8, HEAD, HEAD, 8, 8, 64, 64);
int nameX = PADDING + HEAD + 10;
int nameX = PADDING + HEAD + GAP;
renderScope.drawText(NAME_SCALE, name, nameX, Field.textY(height, NAME_SCALE), Theme.FONT.value,
Theme.FOREGROUND.value);
int dotX = nameX + (int) (Fonts.getWidth(name, Theme.FONT.value) * NAME_SCALE) + 10;
int dotX = nameX + (int) (Fonts.getWidth(name, Theme.FONT.value) * NAME_SCALE) + GAP;
renderScope.drawRoundedRectangle(dotX, (height - DOT) / 2, DOT, DOT, DOT / 2,
ServiceClient.isConnected() ? CONNECTED : Theme.withAlpha(0.3f, Theme.FOREGROUND.value));
}