View Single Post
11-26-10, 09:12 AM   #5
Pyrates
A Cliff Giant
 
Pyrates's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 77
Originally Posted by haste View Post
The swap solution will work as long as you don't try to call element:ForceUpdate() and use frequentUpdates.
Actually I kinda need frequentUpdates, but I think I have a solution (see below). Why wouldn't it work with frequentUpdates?

Are you just trying to make a druid mana bar? Look at the code posted in this addon's description:

http://www.wowinterface.com/download...DruidMana.html

If you want it to completely replace the normal mana bar just place it at the same location, and hide/show each one as needed.
Actually I'm making an energy bar. But I only want it under certain circumstances, that's why I'm thinking about the switching thing.

You can hide every individual unit frame element in combat, they're just unprotected widgets. The only thing you can't change is the base unit frame's (self) visibility / position / etc attributes in combat.
That sounds good, thank you.

So, a possible (and kinda nice) solution seems to make just a second bar, and attach that to self.Power (as opposed to the original bar self.power), and then just self.power:Hide() or self.Power:Hide() depending on which one you want. Did not yet test, but having both bars at the same time works.
__________________
" ... and the Vogon will do things to you that you wish you'd never been born, or, if you're a clearer minded thinker, that the Vogon had never been born."
  Reply With Quote