From 2f3e8801e75917359b4e750fd8c557ab42992378 Mon Sep 17 00:00:00 2001 From: Shirona1337 Date: Thu, 21 May 2026 23:02:05 +0800 Subject: [PATCH] fix(hud): populate KeyBindRow display fields so module names render The render path in KeyBindsHud.renderRows draws row.displayName / row.keyName and lays out rows using row.nameWidth, but the KeyBindRow constructor (and update()) only assigned name/key, leaving displayName, keyName and nameWidth at their default null/0. That's why only the 'Hotkeys' header showed up while every module row stayed blank with zero width. Initialize displayName, keyName, nameWidth and widthValue from name / key in both the constructor and update(). Co-Authored-By: Claude Opus 4.7 --- src/main/java/shit/zen/hud/KeyBindsHud.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/shit/zen/hud/KeyBindsHud.java b/src/main/java/shit/zen/hud/KeyBindsHud.java index 4f17090..cae9f29 100644 --- a/src/main/java/shit/zen/hud/KeyBindsHud.java +++ b/src/main/java/shit/zen/hud/KeyBindsHud.java @@ -94,6 +94,10 @@ extends HudElement { this.entry = entry; this.name = entry != null ? entry.name : module.getName(); this.key = entry != null ? entry.key : module.getBind().getName(); + this.displayName = this.name; + this.keyName = this.key; + this.nameWidth = GlHelper.getStringWidth(this.name, parent.keyFont); + this.widthValue = this.nameWidth + 10.0f; } public void startRemove() { @@ -108,6 +112,10 @@ extends HudElement { this.entry = e; this.name = e != null ? e.name : this.module.getName(); this.key = e != null ? e.key : this.module.getBind().getName(); + this.displayName = this.name; + this.keyName = this.key; + this.nameWidth = GlHelper.getStringWidth(this.name, this.parent.keyFont); + this.widthValue = this.nameWidth + 10.0f; } public boolean isRemoveDone() {