Compare commits

...
4 Commits
Author SHA1 Message Date
selimaj-dev b0d75af8c4 Merge pull request 'Fix the None cloak and reorder the sidebar and title dock' (#12) from release-fixes into master
Reviewed-on: #12
2026-09-29 16:34:48 +00:00
selimaj-devandclaude c973e053aa Open Saturn's settings from the title dock and put Saturn first
The Saturn logo in the title screen's dock now opens Saturn's settings instead of the shift menu,
and it comes first: Saturn, mods, cosmetics, then Minecraft's options last. The shift menu is still
on its key in game.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 18:34:24 +02:00
selimaj-devandclaude bbf6b88ed3 Put settings second and the HUD editor last in the sidebar
The order is now mods, settings, cosmetics, HUD editor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 18:34:24 +02:00
selimaj-devandclaude ba71a5b838 Draw no cloak for "None" instead of the missing texture
"None" is the empty cloak id, but getCurrentCloakTexture still built textures/cloaks/.png from it, so
the renderer drew Minecraft's missing texture. It now returns null for an empty id and for any id
this version has no texture for, and the renderer already skips a null texture.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-09-29 18:34:24 +02:00
3 changed files with 16 additions and 8 deletions
@@ -38,7 +38,14 @@ public class Cloaks {
availableCloaks.add(0, "");
}
/**
* The cloak's texture, or null for no cloak ("", the "None" choice) and for a cloak this version
* has no texture for, which would otherwise draw as the missing texture.
*/
public static IdentifierRef getCurrentCloakTexture(String cloakName) {
if (cloakName == null || !Arrays.asList(ALL_CLOAKS).contains(cloakName)) {
return null;
}
if (Arrays.asList(ANIMATED_CLOAKS).contains(cloakName)) {
return IdentifierRef.ofSaturn("textures/cloaks/" + cloakName + ".gif");
} else {
@@ -22,9 +22,9 @@ public class Sidebar extends Element {
// Values for the constructor's `active`
public static final int MODS = 0;
public static final int COSMETICS = 1;
public static final int HUD_EDITOR = 2;
public static final int SETTINGS = 3;
public static final int SETTINGS = 1;
public static final int COSMETICS = 2;
public static final int HUD_EDITOR = 3;
private static final int LOGO = 32;
private static final int BUTTON = 44;
@@ -35,11 +35,12 @@ public class Sidebar extends Element {
private record Item(IdentifierRef icon, Runnable onClick) {
}
// In the order of the constants above
private final Item[] items = {
new Item(Textures.ICON_MODS, () -> Providers.saturn.getClient().setScreen(new ModMenu())),
new Item(Textures.ICON_SETTINGS, () -> Providers.saturn.getClient().setScreen(new ClientSettings())),
new Item(Textures.ICON_COSMETICS, () -> Providers.saturn.getClient().setScreen(new CosmeticsMenu())),
new Item(Textures.ICON_HUD_EDITOR, () -> Providers.saturn.getClient().setScreen(new HudEditor())),
new Item(Textures.ICON_SETTINGS, () -> Providers.saturn.getClient().setScreen(new ClientSettings())),
};
private final int active;
@@ -26,8 +26,8 @@ import org.saturnclient.ui.resources.Textures;
/**
* Saturn's title screen: the logo over the game's menus in the middle, the
* player and a quit button in the top corners, and along the bottom a dock of
* Saturn's screens, the shift menu and Minecraft's options, and the version.
* player and a quit button in the top corners, and along the bottom a dock
* (Saturn's settings, its mods and cosmetics, then Minecraft's options) and the version.
*/
public class TitleMenu extends SaturnScreen {
// The logo and wordmark as the shift menu has them: the wordmark over the logo's foot
@@ -106,12 +106,12 @@ public class TitleMenu extends SaturnScreen {
.position(width - TOP_EDGE - QUIT_SIZE, TOP_EDGE)
.animation(step(new SlideFade(AnimationConfig.mainMenu, 8), STEP_QUIT)));
// Along the bottom: the dock of Saturn's screens, the shift menu and Minecraft's options, and the version
// Along the bottom: the dock, Saturn first (its settings) and Minecraft's options last, and the version
Dock dock = new Dock(List.of(
new Dock.Item(Textures.LOGO, () -> Providers.saturn.getClient().setScreen(new ClientSettings())),
new Dock.Item(Textures.ICON_MODS, () -> Providers.saturn.getClient().setScreen(new ModMenu())),
new Dock.Item(Textures.ICON_COSMETICS,
() -> Providers.saturn.getClient().setScreen(new CosmeticsMenu())),
new Dock.Item(Textures.LOGO, () -> Providers.saturn.getClient().setScreen(new ShiftMenu())),
new Dock.Item(Textures.ICON_SETTINGS,
() -> Providers.saturn.getClient().setScreen(MinecraftScreen.Options))));
draw(dock.position((width - dock.width) / 2, height - EDGE - Dock.HEIGHT)