File tree Expand file tree Collapse file tree 4 files changed +9
-15
lines changed
src/main/kotlin/com/lambda Expand file tree Collapse file tree 4 files changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ object SettingsWidget {
3939 if (config is Module ) {
4040 with (config.keybindSetting) { buildLayout() }
4141 with (config.disableOnReleaseSetting) { buildLayout() }
42+ with (config.drawSetting) { buildLayout() }
4243 }
4344 smallButton(" Reset" ) {
4445 config.settings.forEach { it.reset(silent = true ) }
@@ -75,7 +76,7 @@ object SettingsWidget {
7576 }
7677 val toIgnoreSettings =
7778 when (config) {
78- is Module -> setOf (config.keybindSetting, config.disableOnReleaseSetting)
79+ is Module -> setOf (config.keybindSetting, config.disableOnReleaseSetting, config.drawSetting )
7980 is UserAutomationConfig -> setOf (config.linkedModules)
8081 else -> emptySet()
8182 }
Original file line number Diff line number Diff line change @@ -124,14 +124,14 @@ abstract class Module(
124124 private val isEnabledSetting = setting(" Enabled" , enabledByDefault) { false }
125125 val keybindSetting = setting(" Keybind" , defaultKeybind) { false }
126126 val disableOnReleaseSetting = setting(" Disable On Release" , false ) { false }
127-
128- open val isVisible: Boolean = true
127+ val drawSetting = setting(" Draw" , true , " Draws the module in the module list hud element" )
129128
130129 var isEnabled by isEnabledSetting
131130 val isDisabled get() = ! isEnabled
132131
133132 val keybind by keybindSetting
134133 val disableOnRelease by disableOnReleaseSetting
134+ val draw by drawSetting
135135
136136 override val isMuted: Boolean
137137 get() = ! isEnabled && ! alwaysListening
Original file line number Diff line number Diff line change @@ -21,21 +21,19 @@ import com.lambda.gui.dsl.ImGuiBuilder
2121import com.lambda.module.HudModule
2222import com.lambda.module.ModuleRegistry
2323import com.lambda.module.tag.ModuleTag
24- import com.lambda.util.KeyCode
2524import imgui.flag.ImGuiCol
2625import java.awt.Color
2726
2827object ModuleList : HudModule(
2928 name = " ModuleList" ,
3029 tag = ModuleTag .HUD ,
3130) {
32- override val isVisible: Boolean
33- get() = false
31+ init {
32+ drawSetting.value = false
33+ }
3434
3535 override fun ImGuiBuilder.buildLayout () {
36- val enabled = ModuleRegistry .modules
37- .filter { it.isEnabled }
38- .filter { it.isVisible }
36+ val enabled = ModuleRegistry .modules.filter { it.isEnabled && it.draw }
3937
4038 enabled.forEach {
4139 text(it.name); sameLine()
Original file line number Diff line number Diff line change 1818package com.lambda.module.modules.player
1919
2020import com.lambda.config.AutomationConfig.Companion.setDefaultAutomationConfig
21- import com.lambda.config.applyEdits
2221import com.lambda.interaction.BaritoneManager
2322import com.lambda.interaction.construction.blueprint.Blueprint.Companion.emptyStructure
2423import com.lambda.interaction.construction.blueprint.PropagatingBlueprint.Companion.propagatingBlueprint
@@ -89,11 +88,7 @@ object HighwayTools : Module(
8988 }
9089
9190 init {
92- setDefaultAutomationConfig {
93- applyEdits {
94- hideGroup(interactConfig)
95- }
96- }
91+ setDefaultAutomationConfig()
9792
9893 onEnable {
9994 octant = player.octant
You can’t perform that action at this time.
0 commit comments