From 9dfd9f06b2154b01bfc1acf01b6bf3eec27fccdd Mon Sep 17 00:00:00 2001 From: Juuz <6596629+Juuxel@users.noreply.github.com> Date: Fri, 9 Jul 2021 23:00:00 +0300 Subject: Make the test visual logger warnings controllable --- .../src/main/java/io/github/cottonmc/test/TestDescription.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'GuiTest/src/main/java/io') diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/TestDescription.java b/GuiTest/src/main/java/io/github/cottonmc/test/TestDescription.java index dc264ba..5cf09d4 100644 --- a/GuiTest/src/main/java/io/github/cottonmc/test/TestDescription.java +++ b/GuiTest/src/main/java/io/github/cottonmc/test/TestDescription.java @@ -22,11 +22,9 @@ public class TestDescription extends SyncedGuiDescription { WGridPanel root = (WGridPanel)this.getRootPanel(); WItemSlot slot = WItemSlot.of(blockInventory, 0, 4, 1); - // test visual logger warnings - slot.setIcon(new TextureIcon(new Identifier("libgui-test", "saddle.png"))); root.add(slot, 0, 1); - WButton buttonA = new WButton(new LiteralText("Button A")); + WButton buttonA = new WButton(new LiteralText("Send Message")); buttonA.setOnClick(() -> { ScreenNetworking.of(this, NetworkSide.CLIENT).send(TEST_MESSAGE, buf -> {}); @@ -34,7 +32,11 @@ public class TestDescription extends SyncedGuiDescription { }); root.add(buttonA, 0, 3, 4, 1); - root.add(new WButton(new LiteralText("Button B")), 5, 3, 4, 1); + + WButton buttonB = new WButton(new LiteralText("Show Warnings")); + buttonB.setOnClick(() -> slot.setIcon(new TextureIcon(new Identifier("libgui-test", "saddle.png")))); + + root.add(buttonB, 5, 3, 4, 1); root.add(new WButton(new LiteralText("Button C")), 0, 5, 4, 1); root.add(new WButton(new LiteralText("Button D")), 5, 5, 4, 1); root.add(new WTextField(new LiteralText("Type something...")), 0, 7, 5, 1); -- cgit