Skip to content

Commit

Permalink
Merge pull request #15 from GTNewHorizons/fix/panel-title-updates
Browse files Browse the repository at this point in the history
Do not require "enter" press to save info panel text
  • Loading branch information
Dream-Master authored Apr 21, 2023
2 parents 729e6ef + 9cff92f commit 9c53465
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -362,12 +362,14 @@ protected void actionPerformed(GuiButton button) {

@Override
protected void keyTyped(char par1, int par2) {
if (textboxTitle != null && textboxTitle.isFocused()) if (par2 == 1) mc.thePlayer.closeScreen();
else if (par1 == 13) updateTitle();
else {
modified = true;
textboxTitle.textboxKeyTyped(par1, par2);
}
else super.keyTyped(par1, par2);
if (textboxTitle != null && textboxTitle.isFocused()) {
if (par2 == 1) mc.thePlayer.closeScreen();
else if (par1 == 13) updateTitle();
else {
modified = true;
textboxTitle.textboxKeyTyped(par1, par2);
updateTitle();
}
} else super.keyTyped(par1, par2);
}
}

0 comments on commit 9c53465

Please sign in to comment.