WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   ArenaEnemyFrame1CastingBar behaviour (https://www.wowinterface.com/forums/showthread.php?t=42490)

Spyro 01-29-12 01:52 PM

ArenaEnemyFrame1CastingBar behaviour
 
Hi.

I want to attach the cast bars of Blizzard's Arena Frames to my Gladius. I'm ONLY interested in the cast bars, so I want to hide the rest of Blizzard's Arena Frames.

But I have a problem: I can ONLY see ArenaEnemyFrame1CastingBar (castbar's frame) when ArenaEnemyFrame1 (enemy's frame) is also visible. If I hide ArenaEnemyFrame1, ArenaEnemyFrame1CastingBar also hides itselfs, but I want to see ONLY ArenaEnemyFrame1CastingBar (having ArenaEnemyFrame1 hidden). As an informative detail, they have the same behaviour with SetScale(), if I change the scale of ArenaEnemyFrame1, the scale of ArenaEnemyFrame1CastingBar also changes.

How can I "break" the relation between these 2 frames?

Seerah 01-29-12 02:11 PM

This is because ArenaEnemyFrame1 is set as the cast bar's parent. You'll need to change its parent to your Gladius frame using

ArenaEnemyFrame1CastingBar:SetParent(whateverGladius'framenameis)

Spyro 02-01-12 08:45 AM

Auto-anchor
 
Worked perfect thx. :D

Now I want to auto-anchor the cast bars when Gladius creates the "GladiusClassIconFramearenaN" frame (one for each enemy). So I have been thinking in using hooksecurefunc() to execute the SetPoint() and stuff after that frame is created. But I have come to the problem that this frame is created by the Gladius' ClassIcon Module (by the ClassIcon:CreateFrame() function) which object (ClassIcon) is declared as LOCAL... so I can't hook that function from my addon :(. Any workaround for this?


All times are GMT -6. The time now is 03:03 PM.

vBulletin © 2020, Jelsoft Enterprises Ltd
© 2004 - 2020 MMOUI