aboutsummaryrefslogtreecommitdiff
path: root/test-common/src/main/java/dev/isxander/yacl
diff options
context:
space:
mode:
authorisXander <xander@isxander.dev>2023-05-29 07:43:28 +0100
committerisXander <xander@isxander.dev>2023-05-29 07:43:28 +0100
commit5e015ded7c30ce959cb23fb5a2abdf2e55353f53 (patch)
tree0246ef74643fd808d146d75f8d8abf4a47bd49ee /test-common/src/main/java/dev/isxander/yacl
parentcb0d24d0fdcdd86587f06fd8683a73995daefed6 (diff)
downloadYetAnotherConfigLib-5e015ded7c30ce959cb23fb5a2abdf2e55353f53.tar.gz
YetAnotherConfigLib-5e015ded7c30ce959cb23fb5a2abdf2e55353f53.tar.bz2
YetAnotherConfigLib-5e015ded7c30ce959cb23fb5a2abdf2e55353f53.zip
fix testmod
Diffstat (limited to 'test-common/src/main/java/dev/isxander/yacl')
-rw-r--r--test-common/src/main/java/dev/isxander/yacl/test/GuiTest.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/test-common/src/main/java/dev/isxander/yacl/test/GuiTest.java b/test-common/src/main/java/dev/isxander/yacl/test/GuiTest.java
index 6937df2..2da0423 100644
--- a/test-common/src/main/java/dev/isxander/yacl/test/GuiTest.java
+++ b/test-common/src/main/java/dev/isxander/yacl/test/GuiTest.java
@@ -2,6 +2,8 @@ package dev.isxander.yacl.test;
import dev.isxander.yacl.api.*;
import dev.isxander.yacl.api.controller.BooleanControllerBuilder;
+import dev.isxander.yacl.api.controller.IntegerSliderControllerBuilder;
+import dev.isxander.yacl.api.controller.StringControllerBuilder;
import dev.isxander.yacl.api.controller.TickBoxControllerBuilder;
import dev.isxander.yacl.gui.RequireRestartScreen;
import dev.isxander.yacl.gui.controllers.*;
@@ -257,24 +259,25 @@ public class GuiTest {
() -> config.stringList,
val -> config.stringList = val
)
- .controller(StringController::new)
+ .controller(StringControllerBuilder::create)
.initial("")
.build())
- .group(ListOption.createBuilder(Integer.class)
+ .group(ListOption.<Integer>createBuilder()
.name(Component.literal("Slider List"))
.binding(
defaults.intList,
() -> config.intList,
val -> config.intList = val
)
- .controller(opt -> new IntegerSliderController(opt, 0, 10, 1))
+ .controller(opt -> IntegerSliderControllerBuilder.create(opt)
+ .range(0, 10).step(1))
.initial(0)
.available(false)
.build())
.group(ListOption.createBuilder(Component.class)
.name(Component.literal("Useless Label List"))
.binding(Binding.immutable(List.of(Component.literal("It's quite impressive that literally every single controller works, without problem."))))
- .controller(LabelController::new)
+ .customController(LabelController::new)
.initial(Component.literal("Initial label"))
.build())
.build())