RSS

Вторник, 05.11.2024, 06:23
Главная » WoW API » API Виджеты » Область »

isOver = LayeredRegion:IsMouseOver([topOffset [, leftOffset [, bottomOffset [, rightOffset]]]])

[ править ]
Returns whether the mouse cursor is over the given region.
[клоны]
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:
Code
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 - 1 if the mouse is over the region; otherwise nil (1nil)

Также смотрите: Область
Ссылки: http://wowprogramming.com/docs/widgets/Region/IsMouseOver