aboutsummaryrefslogtreecommitdiff
path: root/test-common/src/main/java/dev/isxander/yacl3/test/ConfigTest.java
blob: 3b5c8a587a4356b7bd1197622236cdf73930df30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package dev.isxander.yacl3.test;

import dev.isxander.yacl3.config.ConfigEntry;
import dev.isxander.yacl3.config.ConfigInstance;
import dev.isxander.yacl3.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
    }
}