aboutsummaryrefslogtreecommitdiff
path: root/GuiTest
diff options
context:
space:
mode:
authorJuuz <6596629+Juuxel@users.noreply.github.com>2021-07-09 23:00:00 +0300
committerJuuz <6596629+Juuxel@users.noreply.github.com>2021-07-09 23:00:00 +0300
commit9dfd9f06b2154b01bfc1acf01b6bf3eec27fccdd (patch)
tree21ce3ff497077977000b062a52021e5c6540b5f6 /GuiTest
parent3bf4adeb87b3ece22f315802fc8215d5d3796b79 (diff)
downloadLibGui-9dfd9f06b2154b01bfc1acf01b6bf3eec27fccdd.tar.gz
LibGui-9dfd9f06b2154b01bfc1acf01b6bf3eec27fccdd.tar.bz2
LibGui-9dfd9f06b2154b01bfc1acf01b6bf3eec27fccdd.zip
Make the test visual logger warnings controllable
Diffstat (limited to 'GuiTest')
-rw-r--r--GuiTest/src/main/java/io/github/cottonmc/test/TestDescription.java10
1 files changed, 6 insertions, 4 deletions
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);