From aad5111d45a66d943f0bcbe885ccb28249441d11 Mon Sep 17 00:00:00 2001 From: DeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com> Date: Tue, 26 Apr 2022 20:35:35 +0200 Subject: config system rewrite --- .../io/polyfrost/oneconfig/test/TestConfig.java | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'src/main/java/io/polyfrost/oneconfig/test/TestConfig.java') 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"); } } + -- cgit