From 0c0182a65c6d64295a1fae6ca57579c638c389b6 Mon Sep 17 00:00:00 2001 From: DBotThePony Date: Mon, 5 Sep 2022 00:42:03 +0700 Subject: [PATCH] Fix isHovered being true on out-of-bounds children --- .../dbotthepony/mc/otm/client/screen/panels/EditablePanel.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EditablePanel.kt b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EditablePanel.kt index cedc7b00c..88c229296 100644 --- a/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EditablePanel.kt +++ b/src/main/kotlin/ru/dbotthepony/mc/otm/client/screen/panels/EditablePanel.kt @@ -288,6 +288,10 @@ open class EditablePanel @JvmOverloads constructor( fun unsetHovered() { isHovered = false + + for (child in children) { + child.unsetHovered() + } } protected open fun onHovered() {}