aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GuiTest/src/main/java/io/github/cottonmc/test/client/Issue196TestGui.java16
-rw-r--r--GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java1
2 files changed, 17 insertions, 0 deletions
diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/Issue196TestGui.java b/GuiTest/src/main/java/io/github/cottonmc/test/client/Issue196TestGui.java
new file mode 100644
index 0000000..6de8181
--- /dev/null
+++ b/GuiTest/src/main/java/io/github/cottonmc/test/client/Issue196TestGui.java
@@ -0,0 +1,16 @@
+package io.github.cottonmc.test.client;
+
+import net.minecraft.text.Text;
+
+import io.github.cottonmc.cotton.gui.client.LightweightGuiDescription;
+import io.github.cottonmc.cotton.gui.widget.WGridPanel;
+import io.github.cottonmc.cotton.gui.widget.WTextField;
+
+public final class Issue196TestGui extends LightweightGuiDescription {
+ public Issue196TestGui() {
+ WTextField textField = new WTextField(Text.literal("Select with tab and type text"));
+ textField.setText("");
+ ((WGridPanel) rootPanel).add(textField, 0, 0, 4, 1);
+ rootPanel.validate(this);
+ }
+}
diff --git a/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java b/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java
index 32e8343..635040f 100644
--- a/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java
+++ b/GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java
@@ -63,6 +63,7 @@ public class LibGuiTestClient implements ClientModInitializer {
return openScreen(client -> new PaddingTestGui(hori, vert)).run(context);
}))))
.then(literal("#182").executes(openScreen(client -> new Issue182TestGui())))
+ .then(literal("#196").executes(openScreen(client -> new Issue196TestGui())))
));
}