Fix root frame children outside frame bounds not receiving isHovered flag
This commit is contained in:
parent
f26e336785
commit
464e1aa579
@ -925,10 +925,20 @@ open class EditablePanel<out S : Screen> @JvmOverloads constructor(
|
||||
if (isRemoved)
|
||||
return false
|
||||
|
||||
if (parent == null)
|
||||
updateAbsolutePosition()
|
||||
val potentiallyHovered: Boolean
|
||||
|
||||
if (mouseX in absoluteX ..< absoluteX + childrenRectWidth.coerceAtLeast(width) && mouseY in absoluteY ..< absoluteY + childrenRectHeight.coerceAtLeast(height)) {
|
||||
if (parent == null) {
|
||||
updateAbsolutePosition()
|
||||
potentiallyHovered =
|
||||
mouseX in absoluteX + childrenRectX.coerceAtMost(0f) ..< absoluteX + childrenRectWidth.coerceAtLeast(width) &&
|
||||
mouseY in absoluteY + childrenRectY.coerceAtMost(0f) ..< absoluteY + childrenRectHeight.coerceAtLeast(height)
|
||||
} else {
|
||||
potentiallyHovered =
|
||||
mouseX in absoluteX ..< absoluteX + width &&
|
||||
mouseY in absoluteY ..< absoluteY + height
|
||||
}
|
||||
|
||||
if (potentiallyHovered) {
|
||||
var hit = false
|
||||
|
||||
for (child in visibleChildrenInternal) {
|
||||
|
Loading…
Reference in New Issue
Block a user