From ff50e9b54a799bc35f7cea3946114a2fad681e43 Mon Sep 17 00:00:00 2001 From: pothemagicdragon Date: Thu, 18 Jun 2026 21:36:19 -0700 Subject: [PATCH 1/2] Makes modules hideable --- src/main/kotlin/com/lambda/gui/MenuBar.kt | 13 +++++++------ .../com/lambda/gui/components/ClickGuiLayout.kt | 2 +- src/main/kotlin/com/lambda/module/Module.kt | 2 ++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/main/kotlin/com/lambda/gui/MenuBar.kt b/src/main/kotlin/com/lambda/gui/MenuBar.kt index cb3d28f87..1e8951cbe 100644 --- a/src/main/kotlin/com/lambda/gui/MenuBar.kt +++ b/src/main/kotlin/com/lambda/gui/MenuBar.kt @@ -39,6 +39,7 @@ import com.lambda.imgui.ImGui import com.lambda.imgui.ImGui.closeCurrentPopup import com.lambda.imgui.flag.ImGuiCol import com.lambda.imgui.flag.ImGuiStyleVar +import com.lambda.imgui.type.ImBoolean import com.lambda.imgui.flag.ImGuiWindowFlags import com.lambda.interaction.BaritoneHandler import com.lambda.module.ModuleRegistry @@ -264,22 +265,22 @@ object MenuBar { private fun ImGuiBuilder.buildModulesMenu() { menu("Module Tag") { ModuleTag.defaults.forEach { tag -> - menuItem(tag.name, selected = ModuleTag.isTagShown(tag)) { + // checkbox so the dropdown stays open while toggling several tags. + checkbox(tag.name, ImBoolean(ModuleTag.isTagShown(tag))) { ModuleTag.toggleTag(tag) } } } separator() - // By Tag → quick enable/disable per module + // By Tag → toggle whether each module is shown in the ClickGui layout ModuleTag.defaults.forEach { tag -> menu(tag.name) { ModuleRegistry.modules .filter { it.tag == tag } .forEach { module -> - menuItem(module.name, selected = module.isEnabled) { - module.toggle() - } - // Optionally, offer a "Settings..." item to focus this module’s details UI. + // checkbox (not menuItem) so the dropdown stays open while + // toggling several modules in a row. + checkbox(module.name, module::showInClickGui) } } } diff --git a/src/main/kotlin/com/lambda/gui/components/ClickGuiLayout.kt b/src/main/kotlin/com/lambda/gui/components/ClickGuiLayout.kt index 155eda4b0..c9c6867ec 100644 --- a/src/main/kotlin/com/lambda/gui/components/ClickGuiLayout.kt +++ b/src/main/kotlin/com/lambda/gui/components/ClickGuiLayout.kt @@ -344,7 +344,7 @@ object ClickGuiLayout : Loadable, Config( } ModuleRegistry.modules - .filter { it.tag == tag } + .filter { it.tag == tag && it.showInClickGui } .forEach { with(ModuleEntry(it)) { buildLayout() } } val vis = snapOverlays[tag.name] diff --git a/src/main/kotlin/com/lambda/module/Module.kt b/src/main/kotlin/com/lambda/module/Module.kt index b2ec640e8..b85756060 100644 --- a/src/main/kotlin/com/lambda/module/Module.kt +++ b/src/main/kotlin/com/lambda/module/Module.kt @@ -146,6 +146,7 @@ abstract class Module( .onRelease { if (disableOnRelease) disable() } val disableOnReleaseSetting = setting("Disable On Release", false) { false } val drawSetting = setting("Draw", true, "Draws the module in the module list hud element") { false } + val showInClickGuiSetting = setting("Show In ClickGui", true, "Shows the module in the ClickGui layout") { false } var isEnabled by isEnabledSetting private set @@ -154,6 +155,7 @@ abstract class Module( val keybind by keybindSetting val disableOnRelease by disableOnReleaseSetting val draw by drawSetting + var showInClickGui by showInClickGuiSetting override val isMuted: Boolean get() = !isEnabled && !alwaysListening From 879fdca461ccbcd5ee86e9fa3cc897a17908b403 Mon Sep 17 00:00:00 2001 From: pothemagicdragon Date: Thu, 18 Jun 2026 21:38:44 -0700 Subject: [PATCH 2/2] removes unnecessary comments --- src/main/kotlin/com/lambda/gui/MenuBar.kt | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/kotlin/com/lambda/gui/MenuBar.kt b/src/main/kotlin/com/lambda/gui/MenuBar.kt index 1e8951cbe..2b4d3e4f3 100644 --- a/src/main/kotlin/com/lambda/gui/MenuBar.kt +++ b/src/main/kotlin/com/lambda/gui/MenuBar.kt @@ -265,7 +265,6 @@ object MenuBar { private fun ImGuiBuilder.buildModulesMenu() { menu("Module Tag") { ModuleTag.defaults.forEach { tag -> - // checkbox so the dropdown stays open while toggling several tags. checkbox(tag.name, ImBoolean(ModuleTag.isTagShown(tag))) { ModuleTag.toggleTag(tag) } @@ -278,8 +277,6 @@ object MenuBar { ModuleRegistry.modules .filter { it.tag == tag } .forEach { module -> - // checkbox (not menuItem) so the dropdown stays open while - // toggling several modules in a row. checkbox(module.name, module::showInClickGui) } }