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...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

1146 Part IV ■ <strong>Reference</strong>ProtectedFrames in the FrameXML include the action bars (the frames that group the actionbuttons together), the panels that display in<strong>for</strong>mation like your character status <strong>and</strong>quest log, <strong>and</strong> the gr<strong>and</strong>daddy <strong>of</strong> the rest <strong>of</strong> the UI, UIParent.Frame has all the methods from Region, ScriptObject <strong>and</strong> VisibleRegion, plus thefollowing:AllowAttributeChangesTemporarily allows insecure code to modify the frame’s attributes duringcombat.Frame:AllowAttributeChanges()This permission is automatically rescinded when the frame’s OnUpdate scriptnext runs.CanChangeAttributeReturns whether secure frame attributes can currently be changed.enabled = Frame:CanChangeAttribute()Applies only to protected frames inheriting from one <strong>of</strong> the secure frametemplates; frame attributes may only be changed by non-Blizzard scripts whilethe player is not in combat (or <strong>for</strong> a short time after a secure script calls:AllowAttributeChanges()).Returns:enabled—1 if secure frame attributes can currently be changed; otherwise nil(1nil)CreateFontStringCreates a new FontString as a child <strong>of</strong> the frame.fontstring = Frame:CreateFontString([“name“ [, “layer“ [, “inherits“]]])Arguments:name (optional)—Global name <strong>for</strong> the new font string (string)layer (optional)—Graphic layer on which to create the font string; defaults toARTWORK if not specified (string, layer)inherits (optional)—Name <strong>of</strong> a template from which the new front stringshould inherit (string)Returns:fontstring—<strong>Reference</strong> to the new FontString object (fontstring)CreateTextureCreates a new Texture as a child <strong>of</strong> the frame.texture = Frame:CreateTexture([“name“ [, “layer“ [, “inherits“]]])Arguments:name (optional)—Global name <strong>for</strong> the new texture (string)layer (optional)—Graphic layer on which to create the texture; defaults toARTWORK if not specified (string, layer)inherits (optional)—Name <strong>of</strong> a template from which the new texture shouldinherit (string)

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

Saved successfully!

Ooh no, something went wrong!