From ead0b794ac57e9ab2558338f7f3da7545d2e12ff Mon Sep 17 00:00:00 2001 From: isXander Date: Mon, 22 May 2023 19:33:00 +0100 Subject: scrollable navbar, group descriptions, auto-scroll descriptions --- .../main/java/dev/isxander/yacl/test/GuiTest.java | 38 +++++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) (limited to 'test-common/src/main/java/dev/isxander/yacl') 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 f274fe2..7c9cf9d 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 @@ -84,7 +84,7 @@ public class GuiTest { .name(Component.literal("Custom Boolean Toggle")) .description(OptionDescription.createBuilder() .name(Component.literal("Custom Boolean Toggle")) - .description(Component.literal("You can customize controllers like so! YACL is truly infinitely customizable!")) + .description(Component.literal("You can customize controllers like so! YACL is truly infinitely customizable! This tooltip is long in order to demonstrate the cool, smooth scrolling of these descriptions. Did you know, they are also super clickable?! I know, cool right, YACL 3.x really is amazing.")) .image(Path.of("D:\\Xander\\Downloads\\_MG_0860-Enhanced-NR.png"), new ResourceLocation("yacl", "f.webp")) .build()) .tooltip(Component.literal("You can customize these controllers like this!")) @@ -283,10 +283,6 @@ public class GuiTest { .initial(Component.literal("Initial label")) .build()) .build()) - .category(PlaceholderCategory.createBuilder() - .name(Component.literal("Placeholder Category")) - .screen((client, yaclScreen) -> new RequireRestartScreen(yaclScreen)) - .build()) .category(ConfigCategory.createBuilder() .name(Component.literal("Group Test")) .option(Option.createBuilder(boolean.class) @@ -332,6 +328,38 @@ public class GuiTest { .build()) .build()) .build()) + .category(ConfigCategory.createBuilder() + .name(Component.literal("Category Test")) + .option(LabelOption.create(Component.literal("This is a test category!"))) + .build()) + .category(ConfigCategory.createBuilder() + .name(Component.literal("Category Test")) + .option(LabelOption.create(Component.literal("This is a test category!"))) + .build()) + .category(ConfigCategory.createBuilder() + .name(Component.literal("Category Test")) + .option(LabelOption.create(Component.literal("This is a test category!"))) + .build()) + .category(ConfigCategory.createBuilder() + .name(Component.literal("Category Test")) + .option(LabelOption.create(Component.literal("This is a test category!"))) + .build()) + .category(ConfigCategory.createBuilder() + .name(Component.literal("Category Test")) + .option(LabelOption.create(Component.literal("This is a test category!"))) + .build()) + .category(ConfigCategory.createBuilder() + .name(Component.literal("Category Test")) + .option(LabelOption.create(Component.literal("This is a test category!"))) + .build()) + .category(ConfigCategory.createBuilder() + .name(Component.literal("Category Test")) + .option(LabelOption.create(Component.literal("This is a test category!"))) + .build()) + .category(PlaceholderCategory.createBuilder() + .name(Component.literal("Placeholder Category")) + .screen((client, yaclScreen) -> new RequireRestartScreen(yaclScreen)) + .build()) .save(() -> { Minecraft.getInstance().options.save(); ConfigTest.GSON.save(); -- cgit