diff options
Diffstat (limited to 'src/testmod')
-rw-r--r-- | src/testmod/java/dev/isxander/yacl3/test/GuiTest.java | 16 | ||||
-rw-r--r-- | src/testmod/resources/assets/yacl_test/textures/images/sample1.webp | bin | 0 -> 10474 bytes | |||
-rw-r--r-- | src/testmod/resources/assets/yacl_test/textures/images/sample3.webp | bin | 0 -> 2058520 bytes | |||
-rw-r--r-- | src/testmod/resources/assets/yacl_test/textures/images/sample4.gif | bin | 0 -> 13717 bytes |
4 files changed, 13 insertions, 3 deletions
diff --git a/src/testmod/java/dev/isxander/yacl3/test/GuiTest.java b/src/testmod/java/dev/isxander/yacl3/test/GuiTest.java index 34ae06a..3ddfce6 100644 --- a/src/testmod/java/dev/isxander/yacl3/test/GuiTest.java +++ b/src/testmod/java/dev/isxander/yacl3/test/GuiTest.java @@ -64,7 +64,7 @@ public class GuiTest { private static Screen getFullTestSuite(Screen parent) { AtomicReference<Option<Boolean>> booleanOption = new AtomicReference<>(); - ConfigTest.GSON.serializer().load(); + ConfigTest.GSON.load(); return YetAnotherConfigLib.create(ConfigTest.GSON, (defaults, config, builder) -> builder .title(Component.literal("Test GUI")) .category(ConfigCategory.createBuilder() @@ -83,7 +83,7 @@ public class GuiTest { .append(Component.literal("e").withStyle(style -> style.withHoverEvent(new HoverEvent(HoverEvent.Action.SHOW_TEXT, Component.literal("e"))))) .withStyle(style -> style.withClickEvent(new ClickEvent(ClickEvent.Action.OPEN_URL, "https://isxander.dev"))) ) - .webpImage(new ResourceLocation("yacl3-test", "reach-around-placement.webp")) + .webpImage(imageSample("sample1.webp")) .build()) .binding( defaults.booleanToggle, @@ -113,7 +113,10 @@ public class GuiTest { .build()) .option(Option.<Boolean>createBuilder() .name(Component.literal("Tick Box")) - .description(OptionDescription.of(Component.literal("There are even alternate methods of displaying the same data type!"))) + .description(OptionDescription.createBuilder() + .text(Component.literal("There are even alternate methods of displaying the same data type!")) + .webpImage(imageSample("sample3.webp")) + .build()) .binding( defaults.tickbox, () -> config.tickbox, @@ -126,6 +129,9 @@ public class GuiTest { .name(Component.literal("Slider Controllers")) .option(Option.<Integer>createBuilder() .name(Component.literal("Int Slider")) + .description(OptionDescription.createBuilder() + .gifImage(imageSample("sample4.gif")) + .build()) .binding( defaults.intSlider, () -> config.intSlider, @@ -489,6 +495,10 @@ public class GuiTest { .generateScreen(parent); } + private static ResourceLocation imageSample(String name) { + return new ResourceLocation("yacl_test", "textures/images/" + name); + } + private static boolean myBooleanOption = true; private static Screen getWikiGetStarted(Screen parent) { diff --git a/src/testmod/resources/assets/yacl_test/textures/images/sample1.webp b/src/testmod/resources/assets/yacl_test/textures/images/sample1.webp Binary files differnew file mode 100644 index 0000000..0da983e --- /dev/null +++ b/src/testmod/resources/assets/yacl_test/textures/images/sample1.webp diff --git a/src/testmod/resources/assets/yacl_test/textures/images/sample3.webp b/src/testmod/resources/assets/yacl_test/textures/images/sample3.webp Binary files differnew file mode 100644 index 0000000..bc91220 --- /dev/null +++ b/src/testmod/resources/assets/yacl_test/textures/images/sample3.webp diff --git a/src/testmod/resources/assets/yacl_test/textures/images/sample4.gif b/src/testmod/resources/assets/yacl_test/textures/images/sample4.gif Binary files differnew file mode 100644 index 0000000..9231bae --- /dev/null +++ b/src/testmod/resources/assets/yacl_test/textures/images/sample4.gif |