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 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user