fix(StringButton): restore idle signing animation

This commit is contained in:
cattyn
2025-11-05 16:34:57 +03:00
parent 3cf7e9cac4
commit 9b6de34e73
@@ -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);
}