Skip to content
Open
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
5 changes: 3 additions & 2 deletions src/main/java/cam72cam/mod/gui/screen/TextField.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
import java.util.function.Predicate;

/** Base text field */
public class TextField implements IWidget{
public class TextField implements IWidget {
protected final GuiTextField textfield;

/** Standard constructor */
public TextField(IScreenBuilder builder, int x, int y, int width, int height) {
this(builder,
new GuiTextField(-1, Minecraft.getMinecraft().fontRenderer, builder.getWidth() / 2 + x, builder.getHeight() / 4 + y, width, height));
//Offset x&y by 1 and minus width&height by 2 to let border be within the range specified
new GuiTextField(-1, Minecraft.getMinecraft().fontRenderer, builder.getWidth() / 2 + x + 1, builder.getHeight() / 4 + y + 1, width - 2, height - 2));
}

/** Internal, can be overridden to support custom GuiTextFields */
Expand Down