diff options
author | Kevin <92656833+kevinthegreat1@users.noreply.github.com> | 2024-04-21 16:10:15 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-21 16:10:15 -0400 |
commit | 01b4ff489368182d164e2d38560c7a06183018b8 (patch) | |
tree | 92f88214b70e824aa87bf2dc9eb899696134bd7d /src/main/java/de/hysky/skyblocker/skyblock/auction/EditBidPopup.java | |
parent | 95fa171cd0f981f77a9a64aa77d9d69b81503253 (diff) | |
parent | c43370daf17ea547f80908cf9391fac1d7756b45 (diff) | |
download | Skyblocker-01b4ff489368182d164e2d38560c7a06183018b8.tar.gz Skyblocker-01b4ff489368182d164e2d38560c7a06183018b8.tar.bz2 Skyblocker-01b4ff489368182d164e2d38560c7a06183018b8.zip |
Merge pull request #654 from viciscat/fancier-bars
Fancier bars
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/skyblock/auction/EditBidPopup.java')
-rw-r--r-- | src/main/java/de/hysky/skyblocker/skyblock/auction/EditBidPopup.java | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/auction/EditBidPopup.java b/src/main/java/de/hysky/skyblocker/skyblock/auction/EditBidPopup.java index 6b90b86c..9d460803 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/auction/EditBidPopup.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/auction/EditBidPopup.java @@ -34,18 +34,7 @@ public class EditBidPopup extends AbstractPopupScreen { super.init(); layout = DirectionalLayoutWidget.vertical(); layout.spacing(8).getMainPositioner().alignHorizontalCenter(); - textFieldWidget = new TextFieldWidget(textRenderer, 120, 15, Text.empty()) { - @Override - public boolean keyPressed(int keyCode, int scanCode, int modifiers) { - if (!super.keyPressed(keyCode, scanCode, modifiers)) { - if (keyCode == GLFW.GLFW_KEY_ENTER || keyCode == GLFW.GLFW_KEY_KP_ENTER) { - done(null); - return true; - } - } else return true; - return false; - } - }; + textFieldWidget = new EnterConfirmTextFieldWidget(textRenderer, 120, 15, Text.empty(), () -> done(null)); textFieldWidget.setTextPredicate(this::isStringGood); layout.add(new TextWidget(Text.literal("- Set Bid -").fillStyle(Style.EMPTY.withBold(true)), textRenderer)); layout.add(textFieldWidget); |