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> 1149GetBackdropColorReturns the shading color <strong>for</strong> the frame’s background graphic.red, green, blue, alpha = Frame:GetBackdropColor()Returns:red—Red component <strong>of</strong> the color (0.0 - 1.0) (number)green—Green component <strong>of</strong> the color (0.0 - 1.0) (number)blue—Blue component <strong>of</strong> the color (0.0 - 1.0) (number)alpha (optional)—Alpha (opacity) <strong>for</strong> the graphic (0.0 = fully transparent, 1.0 =fully opaque) (number)GetBoundsRectReturns the position <strong>and</strong> dimension <strong>of</strong> the smallest area enclosing the frame<strong>and</strong> its children.left, bottom, width, height = Frame:GetBoundsRect()This in<strong>for</strong>mation may not match that returned by :GetRect() if the framecontains textures, font strings, or child frames whose boundaries lie outside itsown.Returns:left—Distance from the left edge <strong>of</strong> the screen to the left edge <strong>of</strong> the area (inpixels) (number)bottom—Distance from the bottom edge <strong>of</strong> the screen to the bottom <strong>of</strong> the area(in pixels) (number)width—Width <strong>of</strong> the area (in pixels) (number)height—Height <strong>of</strong> the area (in pixels) (number)Example:CreateFrame(“Frame“,“TestFrame1“, UIParent)TestFrame1:SetWidth(100)TestFrame1:SetHeight(100)TestFrame1:SetPoint(“BOTTOMLEFT“,0,0)CreateFrame(“Frame“,“TestFrame2“, TestFrame1)TestFrame2:SetWidth(100)TestFrame2:SetHeight(100)TestFrame2:SetPoint(“CENTER“,TestFrame1,“TOPRIGHT“,0,0)TestFrame1:GetBoundsRect()-- prints “0, 0, 150, 150“GetChildrenReturns a list <strong>of</strong> child frames <strong>of</strong> the frame.... = Frame:GetChildren()Returns:...—A list <strong>of</strong> the frames which are children <strong>of</strong> this frame (list)

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

Saved successfully!

Ooh no, something went wrong!