aboutsummaryrefslogtreecommitdiff
path: root/src/testmod/java/dev/isxander/yacl
diff options
context:
space:
mode:
authorxander <xander@isxander.dev>2022-09-01 14:10:08 +0100
committerxander <xander@isxander.dev>2022-09-01 14:10:08 +0100
commit627c45bd6cfa7cce9e048d7681029c812a45f1cc (patch)
tree2c1931b9586b021c1e3d54db7bb1a01d6b644bff /src/testmod/java/dev/isxander/yacl
parent21728802a4ee2b65a32b626140ff01bf59a456c6 (diff)
downloadYetAnotherConfigLib-627c45bd6cfa7cce9e048d7681029c812a45f1cc.tar.gz
YetAnotherConfigLib-627c45bd6cfa7cce9e048d7681029c812a45f1cc.tar.bz2
YetAnotherConfigLib-627c45bd6cfa7cce9e048d7681029c812a45f1cc.zip
category tooltips
fix slider scrolling
Diffstat (limited to 'src/testmod/java/dev/isxander/yacl')
-rw-r--r--src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java b/src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java
index 0c39ff6..d71a83b 100644
--- a/src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java
+++ b/src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java
@@ -22,6 +22,7 @@ public class ModMenuIntegration implements ModMenuApi {
.title(Text.of("Test GUI"))
.category(ConfigCategory.createBuilder()
.name(Text.of("Control Examples"))
+ .tooltip(Text.of("Example Category Description"))
.option(Option.createBuilder(boolean.class)
.name(Text.of("Boolean Toggle"))
.binding(
@@ -139,6 +140,15 @@ public class ModMenuIntegration implements ModMenuApi {
.build())
.category(ConfigCategory.createBuilder()
.name(Text.of("Scroll Test"))
+ .option(Option.createBuilder(int.class)
+ .name(Text.of("Int Slider that is cut off because the slider"))
+ .binding(
+ 0,
+ () -> TestSettings.scrollingSlider,
+ (value) -> TestSettings.scrollingSlider = value
+ )
+ .controller(opt -> new IntegerSliderController(opt, 0, 10, 1))
+ .build())
.option(ButtonOption.createBuilder()
.name(Text.of("Option"))
.action(() -> {})
@@ -222,6 +232,8 @@ public class ModMenuIntegration implements ModMenuApi {
private static boolean groupTestFirstGroup2 = false;
private static boolean groupTestSecondGroup = false;
+ private static int scrollingSlider = 0;
+
public enum Alphabet {
A, B, C
}