mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 19:44:05 +09:00
fix: 'q' would close the ui when you're typing in something
This commit is contained in:
@@ -415,13 +415,25 @@ class UIItemTextLineInput(
|
||||
fboUpdateLatch = true
|
||||
}
|
||||
|
||||
override fun hide() {
|
||||
super.hide()
|
||||
if (this.isEnabled) {
|
||||
this.isEnabled = false
|
||||
TerrarumGlobalState.HAS_KEYBOARD_INPUT_FOCUS.unset()
|
||||
}
|
||||
}
|
||||
|
||||
override fun update(delta: Float) {
|
||||
if (mouseoverUpdateLatch) {
|
||||
super.update(delta)
|
||||
val mouseDown = Terrarum.mouseDown
|
||||
|
||||
if (mouseDown) {
|
||||
val oldEnabled = isEnabled
|
||||
isEnabled = mouseUp
|
||||
|
||||
if (oldEnabled && !isEnabled) TerrarumGlobalState.HAS_KEYBOARD_INPUT_FOCUS.unset()
|
||||
if (!oldEnabled && isEnabled) TerrarumGlobalState.HAS_KEYBOARD_INPUT_FOCUS.set()
|
||||
}
|
||||
|
||||
if (App.getConfigString("inputmethod") == "none") imeOn = false
|
||||
|
||||
Reference in New Issue
Block a user