diff options
author | Xander <xander@isxander.dev> | 2023-04-25 16:28:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-25 16:28:41 +0100 |
commit | 13c7ba45ff201423eb8dba8a40cfb66ebb531439 (patch) | |
tree | 1e799aa9da11fbc0833bc6b7c6e6799633c2ec50 /test-common/src/main/java/dev/isxander/yacl/test/ConfigTest.java | |
parent | 8ba7196ae990fe9aa98680aba1b387e385fff99c (diff) | |
download | YetAnotherConfigLib-13c7ba45ff201423eb8dba8a40cfb66ebb531439.tar.gz YetAnotherConfigLib-13c7ba45ff201423eb8dba8a40cfb66ebb531439.tar.bz2 YetAnotherConfigLib-13c7ba45ff201423eb8dba8a40cfb66ebb531439.zip |
Architectury! (#61)
Diffstat (limited to 'test-common/src/main/java/dev/isxander/yacl/test/ConfigTest.java')
-rw-r--r-- | test-common/src/main/java/dev/isxander/yacl/test/ConfigTest.java | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/test-common/src/main/java/dev/isxander/yacl/test/ConfigTest.java b/test-common/src/main/java/dev/isxander/yacl/test/ConfigTest.java new file mode 100644 index 0000000..71cb285 --- /dev/null +++ b/test-common/src/main/java/dev/isxander/yacl/test/ConfigTest.java @@ -0,0 +1,51 @@ +package dev.isxander.yacl.test; + +import dev.isxander.yacl.config.ConfigEntry; +import dev.isxander.yacl.config.ConfigInstance; +import dev.isxander.yacl.config.GsonConfigInstance; + +import java.awt.*; +import java.util.List; +import java.nio.file.Path; + +public class ConfigTest { + public static final ConfigInstance<ConfigTest> GSON = GsonConfigInstance.createBuilder(ConfigTest.class) + .setPath(Path.of("./config/yacl-test.json")) + .build(); + + @ConfigEntry public boolean booleanToggle = false; + @ConfigEntry public boolean customBooleanToggle = false; + @ConfigEntry public boolean tickbox = false; + @ConfigEntry public int intSlider = 0; + @ConfigEntry public double doubleSlider = 0; + @ConfigEntry public float floatSlider = 0; + @ConfigEntry public long longSlider = 0; + @ConfigEntry public String textField = "Hello"; + @ConfigEntry public Color colorOption = Color.red; + @ConfigEntry public double doubleField = 0.5; + @ConfigEntry public float floatField = 0.5f; + @ConfigEntry public int intField = 5; + @ConfigEntry public long longField = 5; + @ConfigEntry public Alphabet enumOption = Alphabet.A; + + @ConfigEntry + public List<String> stringList = List.of("This is quite cool.", "You can add multiple items!", "And it is integrated so well into Option groups!"); + @ConfigEntry + public List<Integer> intList = List.of(1, 2, 3); + + @ConfigEntry + public boolean groupTestRoot = false; + @ConfigEntry + public boolean groupTestFirstGroup = false; + @ConfigEntry + public boolean groupTestFirstGroup2 = false; + @ConfigEntry + public boolean groupTestSecondGroup = false; + + @ConfigEntry + public int scrollingSlider = 0; + + public enum Alphabet { + A, B, C + } +} |