Fix double hover
This commit is contained in:
parent
a0450a9e39
commit
ead57e567d
@ -273,9 +273,9 @@ open class EditablePanel @JvmOverloads constructor(
|
||||
} else {
|
||||
isHovered = parent.isHovered &&
|
||||
mouse_x >= absoluteX &&
|
||||
mouse_x <= absoluteX + width &&
|
||||
mouse_x < absoluteX + width &&
|
||||
mouse_y >= absoluteY &&
|
||||
mouse_y <= absoluteY + height
|
||||
mouse_y < absoluteY + height
|
||||
}
|
||||
|
||||
val scissor = this.scissor
|
||||
@ -681,12 +681,12 @@ open class EditablePanel @JvmOverloads constructor(
|
||||
|
||||
fun withinBounds(mouse_x: Double, mouse_y: Double): Boolean {
|
||||
val pos: ScreenPos = localToScreen()
|
||||
return pos.x <= mouse_x && pos.x + width >= mouse_x && pos.y <= mouse_y && pos.y + height >= mouse_y
|
||||
return pos.x <= mouse_x && pos.x + width > mouse_x && pos.y <= mouse_y && pos.y + height > mouse_y
|
||||
}
|
||||
|
||||
fun withinExtendedBounds(mouse_x: Double, mouse_y: Double): Boolean {
|
||||
val pos: ScreenPos = localToScreen(boundingX, boundingY)
|
||||
return pos.x <= mouse_x && pos.x + boundingWidth >= mouse_x && pos.y <= mouse_y && pos.y + boundingHeight >= mouse_y
|
||||
return pos.x <= mouse_x && pos.x + boundingWidth > mouse_x && pos.y <= mouse_y && pos.y + boundingHeight > mouse_y
|
||||
}
|
||||
|
||||
final override fun mouseClicked(mouse_x: Double, mouse_y: Double, flag: Int): Boolean {
|
||||
|
Loading…
Reference in New Issue
Block a user