aboutsummaryrefslogtreecommitdiff
path: root/GuiTest/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'GuiTest/src/main')
-rw-r--r--GuiTest/src/main/java/io/github/cottonmc/test/TestController.java22
1 files changed, 11 insertions, 11 deletions
diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/TestController.java b/GuiTest/src/main/java/io/github/cottonmc/test/TestController.java
index 1d3c955..267c49f 100644
--- a/GuiTest/src/main/java/io/github/cottonmc/test/TestController.java
+++ b/GuiTest/src/main/java/io/github/cottonmc/test/TestController.java
@@ -1,10 +1,8 @@
package io.github.cottonmc.test;
import io.github.cottonmc.cotton.gui.CottonInventoryController;
-import io.github.cottonmc.cotton.gui.widget.WButton;
-import io.github.cottonmc.cotton.gui.widget.WGridPanel;
-import io.github.cottonmc.cotton.gui.widget.WItemSlot;
-import io.github.cottonmc.cotton.gui.widget.WPlayerInvPanel;
+import io.github.cottonmc.cotton.gui.widget.*;
+import io.github.cottonmc.cotton.gui.widget.data.Axis;
import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.screen.ScreenHandlerContext;
import net.minecraft.text.LiteralText;
@@ -17,14 +15,16 @@ public class TestController extends CottonInventoryController {
WGridPanel root = (WGridPanel)this.getRootPanel();
root.add(WItemSlot.of(blockInventory, 0, 4, 1), 0, 1);
+
+ root.add(new WButton(new LiteralText("Button A")), 0, 3, 4, 1);
+ root.add(new WButton(new LiteralText("Button B")), 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);
+
+ root.add(createPlayerInventoryPanel(), 0, 9);
- WButton button = new WButton(new LiteralText("Test Button"));
- root.add(button, 0, 3, 5, 1);
-
-
- root.add(createPlayerInventoryPanel(), 0, 5);
-
-
+
this.getRootPanel().validate(this);
}
}