Thread Tools Display Modes
09-06-09, 02:59 PM   #1
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
class colored power not updating

I have an issue with my oUF_viv layout. I can't get it to class color the mana bar in the right way.

I'm using only this code
Code:
	self.Power:SetStatusBarColor(maincolor[1],maincolor[2],maincolor[3])
	self.Power.colorClass = true	
	self.Power.frequentUpdates = true
and

Code:
	self.colors = colors
	self.PostUpdatePower = updatePower
It results in class colored power bars, that are simply STUCK for the player frame (and the target if I target myself or a mob with mana). The bar is full and keeps being shown as full. I have no idea what's wrong, never had this issue before. Reason could be that I'm using a fixed color for all bars, that is defined at the top. It shouldn't be an issue, though. since colorClass is higher in priority and should (in fact it does) overwrite the custom color. But also breaks updating the bar.

Any ideas?
  Reply With Quote
09-06-09, 04:11 PM   #2
Waverian
A Chromatic Dragonspawn
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 188
Do you have a power background with the same texture as your power bar? Setting the colorClass or colorPower flag to true also colors the background of the frame. If it's the same texture it will never look like it's depleting.

Quite annoying, actually. I haven't found a code solution for this, but I also never really looked for one. You can just use a different texture, or what I did was use the same texture but just set the hue darker in an image editing program, and save it as with a new file name for the background.

Last edited by Waverian : 09-06-09 at 04:15 PM.
  Reply With Quote
09-06-09, 04:32 PM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
Hmm...I don't know put I always did this by adding UnitClass(unit) to the PostUpdate func. With that unit you get the color and if the color is not nil or whatever you set the color.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
09-06-09, 06:22 PM   #4
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
It was indeed because of what waverian said. Quite funny actually. It was working like a charm after changing:

Code:
	self.Power.bg:SetAlpha(1.0)
to
Code:
	self.Power.bg:SetAlpha(0.3)
Must have worked all the time, but couldn't see it due to the issue described.
It was no issue with 1.0 and a fixed different color for the BG before.

Seems like I have to live with the fact that I can't use a custom color for the background with classcolored = true. *sad panda*
  Reply With Quote
09-07-09, 01:30 AM   #5
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
You can, just don't call it .bg.
  Reply With Quote
09-07-09, 07:31 PM   #6
Dawn
A Molten Giant
 
Dawn's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 918
Err, sometimes obvious things are ... to much obvious.
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » class colored power not updating


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