WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   oUF (Otravi Unit Frames) (https://www.wowinterface.com/forums/forumdisplay.php?f=87)
-   -   power bar coloring... (https://www.wowinterface.com/forums/showthread.php?t=38907)

barbol12 02-12-11 06:43 PM

power bar coloring...
 
hello, quick question.

how do i color the backdrop of the power bar to be the same color as the statusbar but just lower alpha... for instance, if i have class power bar on for target, how can i color the backdrop to be class colored as well, just lowered alpha. or if i have a custom color i want to use, and have the backdrop be that color as the statusbar, just lower alpha..

Akkorian 02-12-11 08:20 PM

Hi barbol12,

If you just want the background to be the same color but darker, you can just set it up like this:

Code:

frame.Power.colorClass = true
frame.Power.bg.multiplier = 0.25

That will make the power bar’s background the same color as the foreground, but only 25% as bright.

If you really want the alpha (opacity) to be different, you can just set the background’s alpha when you create it:

Code:

frame.Power.colorClass = true
frame.Power.bg.multiplier = 1 -- so it’s the same color

frame.Power.bg:SetAlpha( 0.25 )

Or you could combine the two to make the background darker and more transparent!

barbol12 02-12-11 09:24 PM

awesome, ty... works perfectly


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

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI