Skip to content
Prev Previous commit
Next Next commit
refactor(ModuleList): move color into if statement
  • Loading branch information
cattyngmd committed Dec 15, 2025
commit 28d6811aa049b53bffd6dd9533f64dc13a7847b2
7 changes: 4 additions & 3 deletions src/main/kotlin/com/lambda/module/hud/ModuleList.kt
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,11 @@ object ModuleList : HudModule(

enabled.forEach {
text(it.name); sameLine()
val color = if (it.keybind.key == 0 && it.keybind.mouse == -1) Color.RED else Color.GREEN

if (showKeybind)
withStyleColor(ImGuiCol.Text, color) { text(" [${it.keybind.name}]") }
if (showKeybind) {
val color = if (it.keybind.key == 0 && it.keybind.mouse == -1) Color.RED else Color.GREEN
withStyleColor(ImGuiCol.Text, color) { text(" [${it.keybind.name}]") }
}
}
}
}
Loading