WoW:API Frame SetHitRectInsets: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(New page: {{widgetmethod}} __NOTOC__ Modifies the size of the frame's hit rectangle - the area in which clicks are sent to the frame in question. frame:SetHitRectInsets(left, right, top, bottom); ...)
 
m (Move page script moved page API Frame SetHitRectInsets to API Frame SetHitRectInsets without leaving a redirect)
 
(One intermediate revision by one other user not shown)
Line 5: Line 5:
== Arguments ==
== Arguments ==
:; left : Number - pixels to move the frame's left hit edge to the right by.
:; left : Number - pixels to move the frame's left hit edge to the right by.
:; right : Number - pixels to move the frame's right hit edge to the right by.
:; right : Number - pixels to move the frame's right hit edge to the left by.
:; top : Number - pixels to move the frame's top hit edge down by.
:; top : Number - pixels to move the frame's top hit edge down by.
:; bottom : Number - pixels to move the frame's bottom hit edge down by.
:; bottom : Number - pixels to move the frame's bottom hit edge up by.


== Notes ==
== Notes ==
* Negative values of left, right, top and botton may be used to move the edges in the opposite direction, potentially extending a frame's hit rectangle outside of the frame itself.
* Negative values of left, right, top and botton may be used to move the edges away from the frames center, potentially extending a frame's hit rectangle outside of the frame itself.
* This method will silently fail if called on a protected frame in combat from insecure code.
* This method will silently fail if called on a protected frame in combat from insecure code.

Latest revision as of 04:45, 15 August 2023

Widget API ← Frame < SetHitRectInsets

Modifies the size of the frame's hit rectangle - the area in which clicks are sent to the frame in question.

frame:SetHitRectInsets(left, right, top, bottom);

Arguments[edit]

left
Number - pixels to move the frame's left hit edge to the right by.
right
Number - pixels to move the frame's right hit edge to the left by.
top
Number - pixels to move the frame's top hit edge down by.
bottom
Number - pixels to move the frame's bottom hit edge up by.

Notes[edit]

  • Negative values of left, right, top and botton may be used to move the edges away from the frames center, potentially extending a frame's hit rectangle outside of the frame itself.
  • This method will silently fail if called on a protected frame in combat from insecure code.