Thread Tools Display Modes
03-25-14, 01:34 PM   #1
riph
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 7
Access TotemBorder Frame

Hey,

Just wondering how I would access the `TotemBorder` frame which doesn't have a name (https://github.com/tekkub/wow-ui-sou...e.xml#L45..L62)

Thanks
  Reply With Quote
03-25-14, 03:15 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Call :GetChildren() on its parent.
http://wowprogramming.com/docs/widge...me/GetChildren
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
03-25-14, 03:35 PM   #3
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
I believe frame:GetChildren() is what you're looking for.

Code:
-- Gets all of the frame's child regions (fontstrings, textures):
local backgroundTexture, durationText = TotemFrameTotem1:GetRegions()

-- Gets all of the frame's child frames:
local iconFrame, borderFrame = TotemFrameTotem1:GetChildren()

-- Get each child frame's child frames and regions:
local iconTexture = iconFrame:GetRegions()
local iconCooldown = iconFrame:GetChildren()
local borderTexture = borderFrame:GetRegions()
Children and regions are returned in the order in which they were created.
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
03-25-14, 06:06 PM   #4
riph
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 7
Originally Posted by Phanx View Post
I believe frame:GetChildren() is what you're looking for.

Code:
-- Gets all of the frame's child regions (fontstrings, textures):
local backgroundTexture, durationText = TotemFrameTotem1:GetRegions()

-- Gets all of the frame's child frames:
local iconFrame, borderFrame = TotemFrameTotem1:GetChildren()

-- Get each child frame's child frames and regions:
local iconTexture = iconFrame:GetRegions()
local iconCooldown = iconFrame:GetChildren()
local borderTexture = borderFrame:GetRegions()
Children and regions are returned in the order in which they were created.
Nice one, that was exactly what I was looking for.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Access TotemBorder Frame


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off