File tree Expand file tree Collapse file tree 3 files changed +13
-1
lines changed
src/main/kotlin/com/lambda Expand file tree Collapse file tree 3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ import com.lambda.config.Configurable
2525import com.lambda.config.Configuration
2626import com.lambda.event.events.KeyboardEvent
2727import com.lambda.event.listener.UnsafeListener.Companion.listenUnsafe
28+ import com.lambda.gui.LambdaScreen
2829import com.lambda.gui.Layout
2930import com.lambda.gui.dsl.ImGuiBuilder
3031import com.lambda.module.Module
@@ -61,6 +62,7 @@ object QuickSearch {
6162
6263 init {
6364 listenUnsafe<KeyboardEvent .Press > { event ->
65+ if (mc.currentScreen !is LambdaScreen ) return @listenUnsafe
6466 handleKeyPress(event)
6567 }
6668 }
Original file line number Diff line number Diff line change @@ -31,12 +31,16 @@ import com.lambda.event.listener.Listener
3131import com.lambda.event.listener.SafeListener
3232import com.lambda.event.listener.SafeListener.Companion.listen
3333import com.lambda.event.listener.UnsafeListener
34+ import com.lambda.gui.DearImGui
35+ import com.lambda.gui.LambdaScreen
36+ import com.lambda.module.modules.client.ClickGui
3437import com.lambda.module.tag.ModuleTag
3538import com.lambda.sound.LambdaSound
3639import com.lambda.sound.SoundManager.play
3740import com.lambda.util.Communication.info
3841import com.lambda.util.KeyCode
3942import com.lambda.util.Nameable
43+ import imgui.ImGui
4044
4145/* *
4246 * A [Module] is a feature or tool for the utility mod.
@@ -134,7 +138,12 @@ abstract class Module(
134138 if (! event.isPressed) return @listen
135139 if (keybind == KeyCode .UNBOUND ) return @listen
136140 if (event.translated != keybind) return @listen
137- if (mc.currentScreen != null ) return @listen
141+ if (mc.currentScreen != null ) {
142+ if (ClickGui .isEnabled && mc.currentScreen == LambdaScreen && ! DearImGui .io.wantTextInput) {
143+ LambdaScreen .close()
144+ }
145+ return @listen
146+ }
138147
139148 toggle()
140149 }
Original file line number Diff line number Diff line change @@ -41,6 +41,7 @@ object ClickGui : Module(
4141 description = " ImGui" ,
4242 tag = ModuleTag .CLIENT ,
4343 defaultKeybind = KeyCode .Y ,
44+ autoDisable = true
4445) {
4546 private enum class Group (override val displayName : String ) : NamedEnum {
4647 General (" General" ),
You can’t perform that action at this time.
0 commit comments