Skip to content

Commit 28d6811

Browse files
committed
refactor(ModuleList): move color into if statement
1 parent 15ae931 commit 28d6811

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/main/kotlin/com/lambda/module/hud/ModuleList.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ object ModuleList : HudModule(
4141

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

46-
if (showKeybind)
47-
withStyleColor(ImGuiCol.Text, color) { text(" [${it.keybind.name}]") }
45+
if (showKeybind) {
46+
val color = if (it.keybind.key == 0 && it.keybind.mouse == -1) Color.RED else Color.GREEN
47+
withStyleColor(ImGuiCol.Text, color) { text(" [${it.keybind.name}]") }
48+
}
4849
}
4950
}
5051
}

0 commit comments

Comments
 (0)