Thread Tools Display Modes
Prev Previous Post   Next Post Next
07-21-10, 08:55 PM   #1
Unkn
Premium Member
 
Unkn's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2008
Posts: 258
Question about coloring background...

I am trying to set class color to the backdrop of my hp. Trying to match my oUF layout to my grid. Which is set grey until there is a deficit hp then goes class colored. Right now everyone has bright blue background to their hp. Which is well an improvement over the white or black I was getting, but obviously not right.

Code is as follows. Pulled set points out because its just set points...

Code:
   local hp = CreateFrame("StatusBar", nil, self)
   hp:SetStatusBarTexture(statusbartexture)
   hp:SetHeight(hp_height)
   hp:SetStatusBarColor(0.15, 0.15, 0.15) 
     if unit == "player" then
      ....
    elseif unit == "target" then
      .... 
    else
       .....
    end
        hp:SetBackdrop({bgFile="Interface\\AddOns\\oUF_GearedRedux\\StatusBar\\Minimalistv"})
   hp.colorDisconnected = true
   hp.colorClass = false
   hp.colorClassPet = false
   hp.frequentUpdates = true
   self.Health = hp
   
   
-- set health background color
	local color = RAID_CLASS_COLORS[select(2,  UnitClass("unit"))]	
	if UnitIsPlayer("player") and color then
		hp:SetBackdropColor(color.r, color.g, color.b, 1)
	else
		local r, g, b = UnitSelectionColor("unit")
		hp:SetBackdropColor(r, g, b, 1)	
	end
Thats what I've got. Bright blue backdrop..... Any suggestions? ( blue is friendly? reaction type I believe. So guess thats working. But I want that for npcs and the like. For any player I want class colored.)
Attached Images
File Type: jpeg bluebgofdoom.jpeg (70.9 KB, 737 views)
__________________
"I'm very feminine. And I'll beat the crap out of ANYONE who disagrees!"

Last edited by Unkn : 07-21-10 at 09:02 PM. Reason: edited for typo
  Reply With Quote
 

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Question about coloring background...


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