aboutsummaryrefslogtreecommitdiff
path: root/GuiTest/src/main/java
diff options
context:
space:
mode:
authornea <romangraef@gmail.com>2021-10-30 02:49:38 +0200
committernea <romangraef@gmail.com>2021-10-30 02:49:38 +0200
commit70447a8719b6d8d5ad3ac0da2a5610eef77df9c4 (patch)
tree7daa5a9b8f8ba11978932b4a0a003d2447a585b5 /GuiTest/src/main/java
parente97b093c21755a44474fa0d43e4dca2d275de499 (diff)
downloadLibGui-70447a8719b6d8d5ad3ac0da2a5610eef77df9c4.tar.gz
LibGui-70447a8719b6d8d5ad3ac0da2a5610eef77df9c4.tar.bz2
LibGui-70447a8719b6d8d5ad3ac0da2a5610eef77df9c4.zip
Refactor rendering of WTextField and add text scrolling
Diffstat (limited to 'GuiTest/src/main/java')
-rw-r--r--GuiTest/src/main/java/io/github/cottonmc/test/TestDescription.java4
1 files changed, 2 insertions, 2 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 5cf09d4..70c50d4 100644
--- a/GuiTest/src/main/java/io/github/cottonmc/test/TestDescription.java
+++ b/GuiTest/src/main/java/io/github/cottonmc/test/TestDescription.java
@@ -18,7 +18,7 @@ public class TestDescription extends SyncedGuiDescription {
public TestDescription(ScreenHandlerType<?> type, int syncId, PlayerInventory playerInventory, ScreenHandlerContext context) {
super(type, syncId, playerInventory, getBlockInventory(context, GuiBlockEntity.INVENTORY_SIZE), null);
-
+
WGridPanel root = (WGridPanel)this.getRootPanel();
WItemSlot slot = WItemSlot.of(blockInventory, 0, 4, 1);
@@ -39,7 +39,7 @@ public class TestDescription extends SyncedGuiDescription {
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);
+ root.add(new WTextField(new LiteralText("Type something...")).setMaxLength(64), 0, 7, 5, 1);
root.add(new WLabel(new LiteralText("Large slot:")), 0, 9);
root.add(WItemSlot.outputOf(blockInventory, 0), 4, 9);