blob: fc07120f9fdfe625874ac91f37afcd7e71038784 (
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
package dev.isxander.yacl3.test;
import dev.isxander.yacl3.config.v2.api.ConfigClassHandler;
import dev.isxander.yacl3.config.v2.api.SerialEntry;
import dev.isxander.yacl3.config.v2.api.serializer.GsonConfigSerializerBuilder;
import dev.isxander.yacl3.platform.YACLPlatform;
import java.awt.*;
import java.util.List;
public class ConfigTest {
public static final ConfigClassHandler<ConfigTest> GSON = ConfigClassHandler.createBuilder(ConfigTest.class)
.serializer(config -> GsonConfigSerializerBuilder.create(config)
.setPath(YACLPlatform.getConfigDir().resolve("yacl-test.json"))
.build())
.build();
@SerialEntry
public boolean booleanToggle = false;
@SerialEntry
public boolean customBooleanToggle = false;
@SerialEntry
public boolean tickbox = false;
@SerialEntry
public int intSlider = 0;
@SerialEntry
public double doubleSlider = 0;
@SerialEntry
public float floatSlider = 0;
@SerialEntry
public long longSlider = 0;
@SerialEntry
public String textField = "Hello";
@SerialEntry
public Color colorOption = Color.red;
@SerialEntry
public double doubleField = 0.5;
@SerialEntry
public float floatField = 0.5f;
@SerialEntry
public int intField = 5;
@SerialEntry
public long longField = 5;
@SerialEntry
public Alphabet enumOption = Alphabet.A;
@SerialEntry
public List<String> stringList = List.of("This is quite cool.", "You can add multiple items!", "And it is integrated so well into Option groups!");
@SerialEntry
public List<Integer> intList = List.of(1, 2, 3);
@SerialEntry
public boolean groupTestRoot = false;
@SerialEntry
public boolean groupTestFirstGroup = false;
@SerialEntry
public boolean groupTestFirstGroup2 = false;
@SerialEntry
public boolean groupTestSecondGroup = false;
@SerialEntry
public int scrollingSlider = 0;
public enum Alphabet {
A, B, C
}
}
|