aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/io/polyfrost/oneconfig/test
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-04-26 20:35:35 +0200
committerDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-04-26 20:35:35 +0200
commitaad5111d45a66d943f0bcbe885ccb28249441d11 (patch)
tree94bcedd85c1725a7a813185b0a931ffc3eb215fd /src/main/java/io/polyfrost/oneconfig/test
parent5eb52cdd6ce2e65be7eefecfea7cfdb63404f481 (diff)
downloadOneConfig-aad5111d45a66d943f0bcbe885ccb28249441d11.tar.gz
OneConfig-aad5111d45a66d943f0bcbe885ccb28249441d11.tar.bz2
OneConfig-aad5111d45a66d943f0bcbe885ccb28249441d11.zip
config system rewrite
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/test')
-rw-r--r--src/main/java/io/polyfrost/oneconfig/test/TestConfig.java36
-rw-r--r--src/main/java/io/polyfrost/oneconfig/test/TestPage.java14
2 files changed, 32 insertions, 18 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/test/TestConfig.java b/src/main/java/io/polyfrost/oneconfig/test/TestConfig.java
index 940d9c0..d045df0 100644
--- a/src/main/java/io/polyfrost/oneconfig/test/TestConfig.java
+++ b/src/main/java/io/polyfrost/oneconfig/test/TestConfig.java
@@ -1,30 +1,30 @@
package io.polyfrost.oneconfig.test;
-import io.polyfrost.oneconfig.config.annotations.Category;
-import io.polyfrost.oneconfig.config.annotations.HudComponent;
-import io.polyfrost.oneconfig.config.annotations.Switch;
-import io.polyfrost.oneconfig.config.annotations.TextField;
-import io.polyfrost.oneconfig.config.data.ModData;
+import io.polyfrost.oneconfig.config.annotations.Option;
+import io.polyfrost.oneconfig.config.data.Mod;
import io.polyfrost.oneconfig.config.data.ModType;
+import io.polyfrost.oneconfig.config.data.OptionType;
import io.polyfrost.oneconfig.config.interfaces.Config;
public class TestConfig extends Config {
- @Switch(name = "Cool Switch")
- public static boolean toggle = false;
+ @Option(
+ name = "Test switch",
+ description = "Best description",
+ subcategory = "Test",
+ type = OptionType.SWITCH
+ )
+ public static boolean switchTest;
- @Category(name = "Cool Category")
- public static class category {
- @TextField(name = "Cool text field")
- public static String text = "Very cool text";
- }
-
- @HudComponent(name = "text hud")
- public static TestHud testTextHud = new TestHud();
- @HudComponent(name = "text hud v2")
- public static TestHud testTextHud2 = new TestHud();
+ @Option(
+ name = "Test Page",
+ type = OptionType.PAGE,
+ subcategory = "Test"
+ )
+ public static TestPage testPage = new TestPage();
public TestConfig() {
- super(new ModData("hacks", ModType.UTIL_QOL, "ShadyDev", "1.0"), "hacksConfig.json");
+ super(new Mod("hacks", ModType.UTIL_QOL, "ShadyDev", "1.0"), "hacksConfig.json");
}
}
+
diff --git a/src/main/java/io/polyfrost/oneconfig/test/TestPage.java b/src/main/java/io/polyfrost/oneconfig/test/TestPage.java
new file mode 100644
index 0000000..93fe201
--- /dev/null
+++ b/src/main/java/io/polyfrost/oneconfig/test/TestPage.java
@@ -0,0 +1,14 @@
+package io.polyfrost.oneconfig.test;
+
+import io.polyfrost.oneconfig.config.annotations.Option;
+import io.polyfrost.oneconfig.config.data.OptionType;
+
+public class TestPage {
+ @Option(
+ name = "Other test switch",
+ description = "Best description",
+ subcategory = "Test",
+ type = OptionType.SWITCH
+ )
+ public static boolean switchTest;
+}