12.07.2015 Views

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

Wiley-World.of.Warcraft.Programming.A.Guide.and.Reference.for.Creating.WoW.Addons

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 29 ■ Widget <strong>Reference</strong> 1265This widget script is defined <strong>for</strong> the following widget types: Button,CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,TabardModelOnLeaveRun when the mouse cursor leaves the frame’s interactive area.OnLeave(self, motion)Note that a frame’s mouse-interactive area can be changed via its:SetHitRectInsets() method.Arguments:self—<strong>Reference</strong> to the widget <strong>for</strong> which the script was run (frame)motion—True if the h<strong>and</strong>ler is being run due to actual mouse movement;false if the cursor left the frame due to other circumstances(such as the frame being created underneath the cursor) (boolean)This widget script is defined <strong>for</strong> the following widget types: Button,CheckButton, ColorSelect, Cooldown, DressUpModel, EditBox, Frame,GameTooltip, MessageFrame, Minimap, Model, MovieFrame, PlayerModel,ScrollFrame, ScrollingMessageFrame, SimpleHTML, Slider, StatusBar,TabardModelOnLoadRunwhentheframeiscreated.OnLoad(self)In practice, this h<strong>and</strong>ler is only applicable when defined in XML (either <strong>for</strong>frames created in XML or <strong>for</strong> XML templates inherited by dynamically createdframes). A frame created via CreateFrame() will have already run its(non-existent) OnLoad script by the time that function returns, leaving noopportunity to run an OnLoad h<strong>and</strong>ler set later.Arguments:self—<strong>Reference</strong> to the widget <strong>for</strong> which the script was run (frame)This widget script is defined <strong>for</strong> the following widget types: Alpha, Animation,AnimationGroup, Button, CheckButton, ColorSelect, Cooldown,DressUpModel, EditBox, Frame, GameTooltip, MessageFrame, Minimap,Model, MovieFrame, Path, PlayerModel, Rotation, Scale, ScrollFrame,ScrollingMessageFrame, SimpleHTML, Slider, StatusBar, TabardModel,TranslationOnLoopRun when the animation group’s loop state changes.OnLoop(self, “loopState“)Arguments:self—<strong>Reference</strong> to the widget <strong>for</strong> which the script was run (animgroup)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!