I love wall of commits
This commit is contained in:
parent
e9cdf90045
commit
a2d4b2aeb0
@ -1041,8 +1041,8 @@ open class EditablePanel<out S : Screen> @JvmOverloads constructor(
|
||||
}
|
||||
|
||||
fun withinExtendedBounds(x: Double, y: Double): Boolean {
|
||||
val pos: ScreenPos = localToScreen(if (childrenRectX < 0) childrenRectX else 0f, if (childrenRectY < 0) childrenRectY else 0f)
|
||||
val pos2: ScreenPos = localToScreen(if (childrenRectWidth > width) childrenRectWidth else width, if (childrenRectHeight > height) childrenRectHeight else height)
|
||||
val pos: ScreenPos = localToScreen(childrenRectX.coerceAtMost(0f), childrenRectY.coerceAtMost(0f))
|
||||
val pos2: ScreenPos = localToScreen(childrenRectWidth.coerceAtLeast(width), childrenRectHeight.coerceAtLeast(height))
|
||||
|
||||
return x in pos.x .. pos2.x &&
|
||||
y in pos.y .. pos2.y
|
||||
|
Loading…
Reference in New Issue
Block a user