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.)