Skip to content

Commit 8aa01a7

Browse files
fix: correct TextField length setting position
1 parent 9d261e7 commit 8aa01a7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/cam72cam/mod/gui/screen/TextField.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ public TextField(IScreenBuilder builder, int x, int y, int width, int height) {
1414
this(builder,
1515
//Offset x&y by 1 and minus width&height by 2 to let border be within the range specified
1616
new GuiTextField(-1, Minecraft.getMinecraft().fontRenderer, builder.getWidth() / 2 + x + 1, builder.getHeight() / 4 + y + 1, width - 2, height - 2));
17-
internal.setMaxStringLength(256);
1817
}
1918

2019
/** Internal, can be overridden to support custom GuiTextFields */
2120
protected TextField(IScreenBuilder builder, GuiTextField internal) {
2221
this.internal = internal;
22+
internal.setMaxStringLength(256);
2323
builder.addTextField(this);
2424
}
2525

0 commit comments

Comments
 (0)