From 5e015ded7c30ce959cb23fb5a2abdf2e55353f53 Mon Sep 17 00:00:00 2001 From: isXander Date: Mon, 29 May 2023 07:43:28 +0100 Subject: fix testmod --- test-common/src/main/java/dev/isxander/yacl/test/GuiTest.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'test-common/src/main/java') 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.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()) -- cgit