diff options
author | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-05-14 15:39:04 +0300 |
---|---|---|
committer | Juuz <6596629+Juuxel@users.noreply.github.com> | 2023-05-14 15:42:18 +0300 |
commit | e325d94a8a1641ace08e1560a9240647f3488216 (patch) | |
tree | a2e1beaa57981863f691ffcc4099d72d7d9a1e92 /GuiTest | |
parent | ff361058f96c6af806915831f9b633645059d3d1 (diff) | |
download | LibGui-e325d94a8a1641ace08e1560a9240647f3488216.tar.gz LibGui-e325d94a8a1641ace08e1560a9240647f3488216.tar.bz2 LibGui-e325d94a8a1641ace08e1560a9240647f3488216.zip |
Add test for #196
Diffstat (limited to 'GuiTest')
-rw-r--r-- | GuiTest/src/main/java/io/github/cottonmc/test/client/Issue196TestGui.java | 16 | ||||
-rw-r--r-- | GuiTest/src/main/java/io/github/cottonmc/test/client/LibGuiTestClient.java | 1 |
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()))) )); } |