Thread Tools Display Modes
Prev Previous Post   Next Post Next
02-28-16, 06:48 AM   #1
Layback_
An Onyxian Warder
Join Date: Feb 2016
Posts: 358
Is there any possible way to temporarily group frames up?

So, my plan was to create a cast bar frame which has icon and bar.

Icon has it's base frame and texture (which becomes actual icon displayer), while bar has base frame, status bar frame and texture (which becomes background of status bar), and I would like to (temporarily) group up two base frames.

e.g:
Lua Code:
  1. -- Castbar (Bar)
  2. local Castbar = CreateFrame("StatusBar", nil, UIParent);
  3.  
  4. local backdrop = CreateFrame("Frame"), nil, Castbar);
  5.  
  6. local bg = Castbar:CreateTexture(nil, "BACKGROUND");
  7.  
  8. Castbar.backdrop = backdrop;
  9. Castbar.bg = bg;
  10.  
  11.  
  12. -- Castbar (Icon)
  13. local Icon = CreateFrame("Frame", nil, UIParent);
  14.  
  15. backdrop = CreateFrame("Frame", nil, Icon);
  16.  
  17. local texture = Icon:CreateTexture(nil, "OVERLAY");
  18.  
  19. Icon.backdrop = backdrop;
  20. Icon.texture = texture;

The reason that I'm trying to group them is to SetPoint() as single frame.

I'm not sure if my explanation was clear enough, but any helps that I could get?

(Of course, I could create another base frame which would contain Castbar and Icon, but I would like to ask if there is any alternatives.)

Last edited by Layback_ : 02-28-16 at 06:57 AM.
  Reply With Quote
 

WoWInterface » Developer Discussions » General Authoring Discussion » Is there any possible way to temporarily group frames up?


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