Skip to content

Commit df01e75

Browse files
Merge remote-tracking branch 'origin/1.16.5-forge' into 1.17.1-forge
2 parents 174dedb + b787b55 commit df01e75

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ public boolean keyPressed(int typedChar, int keyCode, int mods) {
143143
return true;
144144
}
145145

146+
@Override
147+
public boolean charTyped(char p_charTyped_1_, int p_charTyped_2_) {
148+
if (active != null) {
149+
return active.internal.charTyped(p_charTyped_1_, p_charTyped_2_);
150+
}
151+
return super.charTyped(p_charTyped_1_, p_charTyped_2_);
152+
}
153+
146154
@Override
147155
public boolean mouseClicked(double x, double y, int button) {
148156
Player.Hand hand = button == 0 ? Player.Hand.PRIMARY : Player.Hand.SECONDARY;

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ public class TextField implements IWidget{
1212
/** Standard constructor */
1313
public TextField(IScreenBuilder builder, int x, int y, int width, int height) {
1414
this(builder,
15-
new EditBox(Minecraft.getInstance().font, builder.getWidth() / 2 + x, builder.getHeight() / 4 + y, width, height,
15+
//Offset x&y by 1 and minus width&height by 2 to let border be within the range specified
16+
new EditBox(Minecraft.getInstance().font, builder.getWidth() / 2 + x + 1, builder.getHeight() / 4 + y + 1, width - 2, height - 2,
1617
new TextComponent("")));
1718
}
1819

0 commit comments

Comments
 (0)