Skip to content

Commit 0b8bdca

Browse files
committed
onlyBound setting in module list
1 parent b9ce554 commit 0b8bdca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ object ModuleList : HudModule(
2828
name = "ModuleList",
2929
tag = ModuleTag.HUD,
3030
) {
31+
val onlyBound by setting("Only Bound", false, "Only displays modules with a keybind")
3132
init {
3233
drawSetting.value = false
3334
}
@@ -36,8 +37,10 @@ object ModuleList : HudModule(
3637
val enabled = ModuleRegistry.modules.filter { it.isEnabled && it.draw }
3738

3839
enabled.forEach {
40+
val bound = it.keybind.key != 0 || it.keybind.mouse != -1
41+
if (onlyBound && !bound) return@forEach
3942
text(it.name); sameLine()
40-
val color = if (it.keybind.key == 0 && it.keybind.mouse == -1) Color.RED else Color.GREEN
43+
val color = if (!bound) Color.RED else Color.GREEN
4144

4245
withStyleColor(ImGuiCol.Text, color) { text(" [${it.keybind.name}]") }
4346
}

0 commit comments

Comments
 (0)