Reply
Thread Tools Display Modes
Unread 03-25-14, 01:34 PM   #1
riph
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 5
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
riph is offline   Reply With Quote
Unread 03-25-14, 03:15 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 9,564
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

Seerah is offline   Reply With Quote
Unread 03-25-14, 03:35 PM   #3
Phanx
A Pyroguard Emberseer
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 4,136
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.
__________________
Author/maintainer of Grid, PhanxChat, ShieldsUp, and many more.
Troubleshoot an addonTurn any code into an addonMore addon resources
Need help with your code? Post all of your actual code! Attach or paste your files.
Please don’t PM me about addon bugs or code questions. Post a comment or forum thread instead!
Phanx is offline   Reply With Quote
Unread 03-25-14, 06:06 PM   #4
riph
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 5
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.
riph is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » General Authoring Discussion » Access TotemBorder Frame

Thread Tools
Display Modes

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