From 9dd2a25a1b959ad525a5cc9977e7a13901eaaf9a Mon Sep 17 00:00:00 2001 From: Shirona1337 Date: Fri, 22 May 2026 13:30:19 +0800 Subject: [PATCH] fix(hud): restore stripped material-icon glyphs in KeyBindsHud The header keyboard icon next to 'Hotkeys' and the toggle icon used when a module has no bound key were both left as empty string literals in the deobfuscated source. Recaf has them as: initSettings(): getStringWidth("\uE1C6", bindFont) getStringWidth("\uE9F6", bindFont) renderRows(): drawTextWithShadow("\uE1C6", ..., bindFont, ...) (both right- and left-aligned branches) drawTextWithShadow("\uE9F6", ..., bindFont, ...) (no-keyName branch) \uE1C6 is the Material Icons "keyboard" glyph and \uE9F6 is "power_settings_new". The bindFont uses materialIcons(18.0f) so the codepoints just need to be put back as Java unicode escapes. Co-Authored-By: Claude Opus 4.7 --- src/main/java/shit/zen/hud/KeyBindsHud.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/shit/zen/hud/KeyBindsHud.java b/src/main/java/shit/zen/hud/KeyBindsHud.java index e55bc1b..60bdc21 100644 --- a/src/main/java/shit/zen/hud/KeyBindsHud.java +++ b/src/main/java/shit/zen/hud/KeyBindsHud.java @@ -184,9 +184,9 @@ extends HudElement { if (this.maxWidth >= 0.0f) { return; } - this.maxWidth = GlHelper.getStringWidth("", this.bindFont); + this.maxWidth = GlHelper.getStringWidth("\uE1C6", this.bindFont); this.totalHeight = GlHelper.getStringWidth("Hotkeys", this.nameFont); - this.visibleHeight = GlHelper.getStringWidth("", this.bindFont); + this.visibleHeight = GlHelper.getStringWidth("\uE9F6", this.bindFont); this.scrollOffset = GlHelper.getFontAscent(this.nameFont); this.alpha = GlHelper.getFontAscent(this.keyFont); this.rowHeight = GlHelper.getFontAscent(this.bindFont); @@ -329,9 +329,9 @@ extends HudElement { float iconX = x + width - 5.0f - this.maxWidth; float titleX = iconX - 3.0f - this.totalHeight; GlHelper.drawTextWithShadow("Hotkeys", titleX, headerTextY, this.nameFont, this.disabledPaint); - GlHelper.drawTextWithShadow("", iconX, headerTextY + 1.0f, this.bindFont, this.disabledPaint); + GlHelper.drawTextWithShadow("๎‡†", iconX, headerTextY + 1.0f, this.bindFont, this.disabledPaint); } else { - GlHelper.drawTextWithShadow("", x + 5.0f, headerTextY + 1.0f, this.bindFont, this.disabledPaint); + GlHelper.drawTextWithShadow("๎‡†", x + 5.0f, headerTextY + 1.0f, this.bindFont, this.disabledPaint); GlHelper.drawTextWithShadow("Hotkeys", x + 5.0f + this.maxWidth + 3.0f, headerTextY, this.nameFont, this.disabledPaint); } if (this.rowList.isEmpty()) { @@ -410,7 +410,7 @@ extends HudElement { } if (row.keyName == null) { float iconX = keyBoxX + (rowH - this.visibleHeight) / 2.0f; - GlHelper.drawTextWithShadow("", iconX, keyTextY, this.bindFont, this.disabledPaint); + GlHelper.drawTextWithShadow("๎งถ", iconX, keyTextY, this.bindFont, this.disabledPaint); continue; } FontRenderer fontRenderer = row.getFittingFont(this.keyFont, rowH - 5.0f);