aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/hud/HUDUtils.java
diff options
context:
space:
mode:
authorWyvest <45589059+Wyvest@users.noreply.github.com>2022-06-24 23:44:58 +0700
committerWyvest <45589059+Wyvest@users.noreply.github.com>2022-06-24 23:44:58 +0700
commitf1830199d99b666f28c2b3b246f688f102adb427 (patch)
tree07fba5e7fce5e523223e8fc9da70f7783d7f15f9 /src/main/java/cc/polyfrost/oneconfig/hud/HUDUtils.java
parentd4463b33342ccb5ea86c2a2c9da37b9b861b6674 (diff)
downloadOneConfig-f1830199d99b666f28c2b3b246f688f102adb427.tar.gz
OneConfig-f1830199d99b666f28c2b3b246f688f102adb427.tar.bz2
OneConfig-f1830199d99b666f28c2b3b246f688f102adb427.zip
TextHud revamp
add docs to Hud fix config not saving when exiting prematurely some new events
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/hud/HUDUtils.java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/hud/HUDUtils.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/hud/HUDUtils.java b/src/main/java/cc/polyfrost/oneconfig/hud/HUDUtils.java
index 6b28835..fb42e9c 100644
--- a/src/main/java/cc/polyfrost/oneconfig/hud/HUDUtils.java
+++ b/src/main/java/cc/polyfrost/oneconfig/hud/HUDUtils.java
@@ -13,7 +13,7 @@ import java.util.ArrayList;
public class HUDUtils {
public static void addHudOptions(OptionPage page, Field field, Object instance) {
HUD hudAnnotation = field.getAnnotation(HUD.class);
- BasicHud hud = (BasicHud) ConfigUtils.getField(field, instance);
+ Hud hud = (Hud) ConfigUtils.getField(field, instance);
if (hud == null) return;
HudCore.huds.add(hud);
String category = hudAnnotation.category();
@@ -22,7 +22,7 @@ public class HUDUtils {
try {
options.add(new ConfigHeader(field, hud, hudAnnotation.name(), category, subcategory, 2));
options.add(new ConfigSwitch(hud.getClass().getField("enabled"), hud, "Enabled", category, subcategory, 2));
- options.addAll(ConfigUtils.getClassOptions(hud));
+ options.addAll(ConfigUtils.getClassOptions(hud, Hud.class));
options.add(new ConfigCheckbox(hud.getClass().getField("rounded"), hud, "Rounded corners", category, subcategory, 1));
options.get(options.size() - 1).addDependency(() -> hud.enabled);
options.add(new ConfigCheckbox(hud.getClass().getField("border"), hud, "Outline/border", category, subcategory, 1));