aboutsummaryrefslogtreecommitdiff
path: root/src/testmod/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/testmod/java')
-rw-r--r--src/testmod/java/dev/isxander/yacl/test/ModMenuIntegration.java11
1 files changed, 9 insertions, 2 deletions
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()