Describe every setting under its name
Properties can carry a one-line description, set with NamedProperty.description for mods, a ConfigManager.property overload for the client's config, and a helper in ModLayout. PropertyList rows show it under the setting's name in muted text. Every mod, HUD layout, general, UI style and animation setting now has one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
@@ -26,17 +26,22 @@ public class ModLayout {
|
||||
public NamedProperty prop() {
|
||||
// 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);
|
||||
put(props, "X", x, "Distance from the left of the screen");
|
||||
put(props, "Y", y, "Distance from the top of the screen");
|
||||
put(props, "Scale", scale, "Size of the display");
|
||||
put(props, "Background Color", bgColor, "Fill behind the display");
|
||||
put(props, "Foreground Color", fgColor, "Color of the text");
|
||||
put(props, "Corner Radius", radius, "Rounding of the background's corners");
|
||||
put(props, "Font", font, "Font of the text");
|
||||
|
||||
return Property.namespace(props).named("In-Game Display");
|
||||
}
|
||||
|
||||
private static void put(Map<String, Property> props, String name, Property prop, String description) {
|
||||
prop.description = description;
|
||||
props.put(name, prop);
|
||||
}
|
||||
|
||||
public ModLayout() {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user