Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
Fixing widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkKronicle committed Nov 10, 2021
1 parent 036ce24 commit 9b138a4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ protected boolean onKeyTypedImpl(int keyCode, int scanCode, int modifiers) {
return false;
}
for (TextFieldWrapper<GuiTextFieldGeneric> field : getTextFields()) {
if (field != null && field.onKeyTyped(keyCode, scanCode, modifiers)) {
return true;
if (field != null && field.isFocused()) {
return field.onKeyTyped(keyCode, scanCode, modifiers);
}
}
return false;
Expand All @@ -132,7 +132,7 @@ protected boolean onKeyTypedImpl(int keyCode, int scanCode, int modifiers) {
protected boolean onCharTypedImpl(char charIn, int modifiers) {
if (getTextFields() != null) {
for (TextFieldWrapper<GuiTextFieldGeneric> field : getTextFields()) {
if (field != null && field.getTextField().charTyped(charIn, modifiers)) {
if (field != null && field.onCharTyped(charIn, modifiers)) {
return true;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public NamedSimpleButton(int x, int y, String text) {

public NamedSimpleButton(int x, int y, String text, boolean alineLeft) {
super(x, y, 5, 20, text);
setWidth(StringUtils.getStringWidth(text) + 2);
setWidth(StringUtils.getStringWidth(text) + 10);
if (!alineLeft) {
setX(this.x - this.width);
}
Expand Down

0 comments on commit 9b138a4

Please sign in to comment.