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() {
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public class ArmorDisplayMod extends Mod implements HudMod {
|
||||
.tags("Utility")
|
||||
.requires(Providers.feature::player),
|
||||
enabled.named("Enabled"),
|
||||
useMainHand.named("Use Main Hand"),
|
||||
useMainHand.named("Use Main Hand").description("Also show the item in your main hand"),
|
||||
layout.prop());
|
||||
}
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ public class ClockMod extends Mod implements HudMod {
|
||||
.version("v0.2.0")
|
||||
.tags("Utility"),
|
||||
enabled.named("Enabled"),
|
||||
format.named("Format"),
|
||||
showSeconds.named("Show seconds"),
|
||||
format.named("Format").description("24-hour or 12-hour time"),
|
||||
showSeconds.named("Show seconds").description("Include seconds in the time"),
|
||||
layout.prop());
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ public class CoordinatesMod extends Mod implements HudMod {
|
||||
.tags("Utility")
|
||||
.requires(Providers.feature::player),
|
||||
enabled.named("Enabled"),
|
||||
displayMethod.named("Display Method"),
|
||||
displayMethod.named("Display Method").description("One line or one per axis, with or without labels"),
|
||||
layout.prop());
|
||||
}
|
||||
|
||||
|
||||
@@ -43,12 +43,12 @@ public class FreelookMod extends Mod {
|
||||
.version("v0.3.1")
|
||||
.requires(Providers.feature::render),
|
||||
enabled.named("Enabled"),
|
||||
toggle.named("Toggle freelook"),
|
||||
freelookKey.named("Freelook Keybinding"),
|
||||
zoomLevel.named("Zoom Level"),
|
||||
zoomInDuration.named("Zoom In Duration"),
|
||||
zoomOutDuration.named("Zoom Out Duration"),
|
||||
curve.named("Curve"));
|
||||
toggle.named("Toggle freelook").description("Press the key once instead of holding it"),
|
||||
freelookKey.named("Freelook Keybinding").description("The key that starts freelook"),
|
||||
zoomLevel.named("Zoom Level").description("Zoom when freelook starts in first person"),
|
||||
zoomInDuration.named("Zoom In Duration").description("How long that zoom takes to ease in"),
|
||||
zoomOutDuration.named("Zoom Out Duration").description("How long that zoom takes to ease out"),
|
||||
curve.named("Curve").description("Easing of the zoom"));
|
||||
}
|
||||
|
||||
// --- Lifecycle Methods ---
|
||||
|
||||
@@ -28,7 +28,7 @@ public class FullbrightMod extends Mod {
|
||||
.tags("Camera")
|
||||
.version("v0.2.0"),
|
||||
enabled.named("Enabled"),
|
||||
brightness.named("Brightness %"));
|
||||
brightness.named("Brightness %").description("How bright the world gets"));
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -31,8 +31,8 @@ public class HealthDisplayMod extends Mod implements HudMod {
|
||||
.tags("Utility")
|
||||
.requires(Providers.feature::player),
|
||||
enabled.named("Enabled"),
|
||||
displayMode.named("Display mode"),
|
||||
decimals.named("Decimals"),
|
||||
displayMode.named("Display mode").description("Show health points or hearts"),
|
||||
decimals.named("Decimals").description("Decimal places shown"),
|
||||
layout.prop());
|
||||
}
|
||||
|
||||
|
||||
@@ -54,11 +54,11 @@ public class KeystrokesMod extends Mod implements HudMod {
|
||||
.tags("Utility")
|
||||
.requires(Providers.feature::player),
|
||||
enabled.named("Enabled"),
|
||||
showMouse.named("Show mouse clicks"),
|
||||
showSpace.named("Show space"),
|
||||
showMouse.named("Show mouse clicks").description("Show the left and right mouse buttons"),
|
||||
showSpace.named("Show space").description("Show the space bar"),
|
||||
layout.prop(),
|
||||
clickFg.named("Clicked fg"),
|
||||
clickBg.named("Clicked bg"));
|
||||
clickFg.named("Clicked fg").description("Text color of a pressed key"),
|
||||
clickBg.named("Clicked bg").description("Background of a pressed key"));
|
||||
layout.renderBackground = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -58,16 +58,16 @@ public class NametagsMod extends Mod {
|
||||
.tags("Camera", "Utility")
|
||||
.version("v0.2.0"),
|
||||
enabled.named("Enabled"),
|
||||
healthDisplay.named("Display health"),
|
||||
players.named("Players"),
|
||||
hostile.named("Hostile"),
|
||||
passive.named("Passive"),
|
||||
heartEmoji.named("Heart emoji"),
|
||||
obfuscate.named("Obfuscate enemy names"),
|
||||
unit.named("Unit"),
|
||||
format.named("Format"),
|
||||
nameColor.named("Name color"),
|
||||
healthColor.named("Health color"));
|
||||
healthDisplay.named("Display health").description("Show health after the name"),
|
||||
players.named("Players").description("Show health on players"),
|
||||
hostile.named("Hostile").description("Show health on hostile mobs"),
|
||||
passive.named("Passive").description("Show health on passive mobs"),
|
||||
heartEmoji.named("Heart emoji").description("Add a heart after the health"),
|
||||
obfuscate.named("Obfuscate enemy names").description("Scramble names into unreadable text"),
|
||||
unit.named("Unit").description("Show health points or hearts"),
|
||||
format.named("Format").description("Value, value out of total, or percent"),
|
||||
nameColor.named("Name color").description("Color of the name"),
|
||||
healthColor.named("Health color").description("Color of the health"));
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
@@ -34,9 +34,9 @@ public class SpeedometerMod extends Mod implements HudMod {
|
||||
.tags("Utility")
|
||||
.requires(Providers.feature::player),
|
||||
enabled.named("Enabled"),
|
||||
axis.named("Speed type"),
|
||||
unitText.named("Unit text"),
|
||||
showLabel.named("Show speed label"),
|
||||
axis.named("Speed type").description("All movement, only horizontal or only vertical"),
|
||||
unitText.named("Unit text").description("Unit shown after the speed"),
|
||||
showLabel.named("Show speed label").description("Show “Speed:” before the value"),
|
||||
layout.prop());
|
||||
}
|
||||
|
||||
|
||||
@@ -31,12 +31,12 @@ public class ZoomMod extends Mod {
|
||||
.tags("Camera", "Utility")
|
||||
.version("v0.2.0"),
|
||||
enabled.named("Enabled"),
|
||||
toggle.named("Toggle zoom"),
|
||||
zoomKey.named("Zoom Keybinding"),
|
||||
zoomLevel.named("Zoom Level"),
|
||||
zoomInDuration.named("Zoom In Duration"),
|
||||
zoomOutDuration.named("Zoom Out Duration"),
|
||||
curve.named("Curve"));
|
||||
toggle.named("Toggle zoom").description("Press the key once instead of holding it"),
|
||||
zoomKey.named("Zoom Keybinding").description("The key that zooms in"),
|
||||
zoomLevel.named("Zoom Level").description("How far the camera zooms in"),
|
||||
zoomInDuration.named("Zoom In Duration").description("How long zooming in takes"),
|
||||
zoomOutDuration.named("Zoom Out Duration").description("How long zooming back out takes"),
|
||||
curve.named("Curve").description("Easing of the zoom"));
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user