Redesign mod settings

A mod's settings button now opens ModSettings: a header with the mod's
icon, name, version, tags and description, a Reset button and an on/off
switch, then its properties as rows, with nested namespaces as titled
sections and a live preview card beside them for HUD mods.

PanelScreen holds the sidebar-and-panel frame that the mod menu, mod
settings and config editor share. PropertyList lays out any config as
rows. The inputs share one field look: Toggle is a switch, Select steps
with arrows, and the number, keybinding and color inputs are boxes. The
color picker opens to the left and closes on outside clicks.

Every property type now implements reset(), which was a no-op, and
ModLayout keeps its settings in order instead of Map.of's. ConfigEditor
moves onto the same frame and rows and drops its HUD preview, which added
a new element every frame.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-09-27 17:13:39 +02:00
co-authored by claude
parent dfebd2367d
commit df09271e81
33 changed files with 860 additions and 277 deletions
@@ -1,5 +1,6 @@
package org.saturnclient.mod;
import java.util.LinkedHashMap;
import java.util.Map;
import org.saturnclient.config.property.Property;
@@ -23,14 +24,17 @@ public class ModLayout {
public int height = 0;
public NamedProperty prop() {
return Property.namespace(Map.of(
"X", x,
"Y", y,
"Scale", scale,
"Background Color", bgColor,
"Foreground Color", fgColor,
"Corner Radius", radius,
"Font", font)).named("In-Game Display");
// A LinkedHashMap, unlike Map.of, keeps the order the settings are shown in.
Map<String, Property> props = new LinkedHashMap<>();
props.put("X", x);
props.put("Y", y);
props.put("Scale", scale);
props.put("Background Color", bgColor);
props.put("Foreground Color", fgColor);
props.put("Corner Radius", radius);
props.put("Font", font);
return Property.namespace(props).named("In-Game Display");
}
public ModLayout() {