aboutsummaryrefslogtreecommitdiff
path: root/src/testmod/java/dev
diff options
context:
space:
mode:
authorxander <xander@isxander.dev>2022-09-04 22:02:21 +0100
committerxander <xander@isxander.dev>2022-09-04 22:02:21 +0100
commit833189bb4d8f524c572b6dcc86a7e146cdcf979f (patch)
treebacf5fdef6b0dbb48b78fe553d5b07f743393670 /src/testmod/java/dev
parent9c283303f5b7e7fff820dc2e5c0acdc4719be7a5 (diff)
downloadYetAnotherConfigLib-833189bb4d8f524c572b6dcc86a7e146cdcf979f.tar.gz
YetAnotherConfigLib-833189bb4d8f524c572b6dcc86a7e146cdcf979f.tar.bz2
YetAnotherConfigLib-833189bb4d8f524c572b6dcc86a7e146cdcf979f.zip
ColorController, javadoc and further improvements to StringController
Diffstat (limited to 'src/testmod/java/dev')
-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()