mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 02:45:13 -04:00
Pressing backslash will open chat with a backslash for commands
This commit is contained in:
parent
4fee62885f
commit
17306ebc69
@ -35,6 +35,7 @@ import de.bixilon.minosoft.gui.rendering.system.window.KeyChangeTypes
|
||||
import de.bixilon.minosoft.modding.event.events.InternalMessageReceiveEvent
|
||||
import de.bixilon.minosoft.modding.event.events.chat.ChatMessageReceiveEvent
|
||||
import de.bixilon.minosoft.modding.event.listener.CallbackEventListener.Companion.listen
|
||||
import de.bixilon.minosoft.util.KUtil
|
||||
import de.bixilon.minosoft.util.KUtil.toResourceLocation
|
||||
import de.bixilon.minosoft.util.delegate.RenderingDelegate.observeRendering
|
||||
|
||||
@ -100,6 +101,16 @@ class ChatElement(guiRenderer: GUIRenderer) : AbstractChatElement(guiRenderer),
|
||||
)
|
||||
) { guiRenderer.gui.open(ChatElement) }
|
||||
|
||||
context.inputHandler.registerKeyCallback(
|
||||
KUtil.minosoft("open_command"),
|
||||
KeyBinding(
|
||||
KeyActions.PRESS to setOf(KeyCodes.KEY_SLASH),
|
||||
)
|
||||
) {
|
||||
guiRenderer.gui.open(ChatElement)
|
||||
this.onCharPress('/'.code)
|
||||
}
|
||||
|
||||
internal.init()
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user