![]() |
The API is no longer being updated here until further notice. |
Returns true if the mouse cursor is hovering over the region.
isMouseOver = ScriptRegion:IsMouseOver([offsetTop, offsetBottom, offsetLeft, offsetRight])
Arguments
- offsetTop
- number?
= 0- Top offset; positive values extend the region for which this function returns true upward. - offsetBottom
- number?
= 0- Bottom offset; negative values extend the region for which this function returns true downward. - offsetLeft
- number?
= 0- Left offset; negative values extend the region for which this function returns true towards the left. - offsetRight
- number?
= 0- Right offset; positive values extend the region for which this function returns true towards the right.
Returns
- isMouseOver
- boolean - True if the mouse cursor is currently over the region (as modified by the offset arguments); false otherwise.
Example
Returns true if the cursor is within 2 pixels of the region.
button:IsMouseOver(2, -2, -2, 2)
Returns true if the cursor is within 50 pixels to the left of the region.
button:IsMouseOver(nil, nil, -50)
