unitframes: add custom healthbar colors

This commit is contained in:
shagu
2016-12-27 14:21:36 +01:00
parent d858d308bb
commit 40789119bd
7 changed files with 32 additions and 26 deletions
+5 -2
View File
@@ -158,8 +158,11 @@ pfUI:RegisterModule("target", function ()
end
local r, g, b = .2, .2, .2
if pfUI_config.unitframes.dark == "1" then
pfUI.uf.target.hp.bar:SetStatusBarColor(r, g, b, hp / hpmax / 4 + .75)
if pfUI_config.unitframes.custom == "1" then
local cr, cg, cb, ca = pfUI.api.strsplit(",", pfUI_config.unitframes.customcolor)
cr, cg, cb = tonumber(cr), tonumber(cg), tonumber(cb)
pfUI.uf.target.hp.bar:SetStatusBarColor(cr, cg, cb, hp / hpmax / 4 + .75)
if pfUI_config.unitframes.pastel == "1" then
r, g, b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
else