More proper mouse grab killing in killfocus
This commit is contained in:
parent
6ea1edd358
commit
74ade46807
@ -1118,15 +1118,25 @@ open class EditablePanel<out S : Screen> @JvmOverloads constructor(
|
||||
if (isFocused) {
|
||||
isFocused = false
|
||||
}
|
||||
|
||||
grabMouseInput = false
|
||||
}
|
||||
|
||||
private fun killGrabMouseInput() {
|
||||
for (child in childrenInternal) {
|
||||
child.killGrabMouseInput()
|
||||
}
|
||||
|
||||
grabMouseInput = false
|
||||
}
|
||||
|
||||
fun killFocus() {
|
||||
if (isEverFocused()) {
|
||||
killFocusInternal()
|
||||
findAbsoluteRoot().updateFocus()
|
||||
} else if (isGrabbingMouseInput()) {
|
||||
killGrabMouseInput()
|
||||
}
|
||||
|
||||
grabMouseInput = false
|
||||
}
|
||||
|
||||
fun findHierarchicalFocus(): EditablePanel<*>? {
|
||||
|
@ -1156,7 +1156,7 @@ open class TextInputPanel<out S : Screen>(
|
||||
cursorCharacter = pos.x
|
||||
|
||||
isSelecting = true
|
||||
grabMouseInput = true
|
||||
tryToGrabMouseInput()
|
||||
}
|
||||
|
||||
return true
|
||||
|
Loading…
Reference in New Issue
Block a user