Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve WTextField #140

Merged
merged 4 commits into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -39,7 +39,7 @@ public TestDescription(ScreenHandlerType<?> type, int syncId, PlayerInventory pl
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);
Expand Down
Loading