From 833189bb4d8f524c572b6dcc86a7e146cdcf979f Mon Sep 17 00:00:00 2001 From: xander Date: Sun, 4 Sep 2022 22:02:21 +0100 Subject: ColorController, javadoc and further improvements to StringController --- .../java/dev/isxander/yacl/test/ModMenuIntegration.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/testmod/java/dev') diff --git a/src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java b/src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java index b966ae8..f90beb8 100644 --- a/src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java +++ b/src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java @@ -8,13 +8,15 @@ import dev.isxander.yacl.gui.controllers.slider.DoubleSliderController; import dev.isxander.yacl.gui.controllers.slider.FloatSliderController; import dev.isxander.yacl.gui.controllers.slider.IntegerSliderController; import dev.isxander.yacl.gui.controllers.slider.LongSliderController; -import dev.isxander.yacl.gui.controllers.string.BasicStringController; +import dev.isxander.yacl.gui.controllers.string.StringController; import net.minecraft.client.MinecraftClient; import net.minecraft.client.gui.screen.Screen; import net.minecraft.client.option.GraphicsMode; import net.minecraft.client.toast.SystemToast; import net.minecraft.text.Text; +import java.awt.*; + public class ModMenuIntegration implements ModMenuApi { @Override public ConfigScreenFactory getModConfigScreenFactory() { @@ -130,7 +132,12 @@ public class ModMenuIntegration implements ModMenuApi { () -> TestSettings.textField, value -> TestSettings.textField = value ) - .controller(BasicStringController::new) + .controller(StringController::new) + .build()) + .option(Option.createBuilder(Color.class) + .name(Text.of("Color Option")) + .binding(Binding.immutable(Color.red)) + .controller(ColorController::new) .build()) .build()) .group(OptionGroup.createBuilder() -- cgit