From 9b6de34e73bdaeade83e562def67f90791f70d68 Mon Sep 17 00:00:00 2001 From: cattyn Date: Wed, 5 Nov 2025 16:34:57 +0300 Subject: [PATCH] fix(StringButton): restore idle signing animation --- .../oyvey/features/gui/items/buttons/StringButton.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/me/alpha432/oyvey/features/gui/items/buttons/StringButton.java b/src/main/java/me/alpha432/oyvey/features/gui/items/buttons/StringButton.java index 93180dd..ba9fe98 100644 --- a/src/main/java/me/alpha432/oyvey/features/gui/items/buttons/StringButton.java +++ b/src/main/java/me/alpha432/oyvey/features/gui/items/buttons/StringButton.java @@ -28,7 +28,7 @@ public class StringButton public static String removeLastChar(String str) { String output = ""; - if (str != null && str.length() > 0) { + if (str != null && !str.isEmpty()) { output = str.substring(0, str.length() - 1); } return output; @@ -38,7 +38,7 @@ public class StringButton public void drawScreen(DrawContext context, int mouseX, int mouseY, float partialTicks) { RenderUtil.rect(context.getMatrices(), this.x, this.y, this.x + (float) this.width + 7.4f, this.y + (float) this.height - 0.5f, this.getState() ? (!this.isHovering(mouseX, mouseY) ? OyVey.colorManager.getColorWithAlpha(ClickGui.getInstance().color.getValue().getAlpha()) : OyVey.colorManager.getColorWithAlpha(ClickGui.getInstance().topColor.getValue().getAlpha())) : (!this.isHovering(mouseX, mouseY) ? 0x11555555 : -2007673515)); if (this.isListening) { - drawString(this.currentString.string() + "_", this.x + 2.3f, this.y - 1.7f - (float) OyVeyGui.getClickGui().getTextOffset(), this.getState() ? -1 : -5592406); + drawString(this.currentString.string() + getIdleSign(), this.x + 2.3f, this.y - 1.7f - (float) OyVeyGui.getClickGui().getTextOffset(), this.getState() ? -1 : -5592406); } else { drawString((this.setting.getName().equals("Buttons") ? "Buttons " : (this.setting.getName().equals("Prefix") ? "Prefix " + Formatting.GRAY : "")) + this.setting.getValue(), this.x + 2.3f, this.y - 1.7f - (float) OyVeyGui.getClickGui().getTextOffset(), this.getState() ? -1 : -5592406); }