Returns whether the mouse cursor is over the given region. This function replaces the previous MouseIsOver
FrameXML function.
If provided, the arguments are treated as offsets by which to adjust the hit rectangle when comparing it to the mouse. They are in screen coordinates; positive offsets move an edge right or up, negative values move it left or down. No frame edges are actually moved. For example:
if button:IsMouseOver(2, -2, -2, 2) then
will return true if the mouse is within 2 pixels of the given frame.
Signature:
isOver
=
Region:IsMouseOver([topOffset
[,
leftOffset
[,
bottomOffset
[,
rightOffset]]]])
Arguments:
topOffset
- The amount by which to displace the top edge of the test rectangle (number
)leftOffset
- The amount by which to displace the left edge of the test rectangle (number
)bottomOffset
- The amount by which to displace the bottom edge of the test rectangle (number
)rightOffset
- The amount by which to displace the right edge of the test rectangle (number
)
Returns:
isOver
-true
if the mouse is over the region; otherwisefalse
(boolean
)