uf: add option for dark and non-pastel colors

This commit is contained in:
shagu
2016-12-02 19:51:00 +01:00
parent 48375a402a
commit 9614443ea7
8 changed files with 108 additions and 20 deletions
+17 -3
View File
@@ -113,11 +113,25 @@ pfUI:RegisterModule("target", function ()
color = UnitReactionColor[UnitReaction("target", "player")]
end
local r, g, b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
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.pastel == "1" then
r, g, b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
else
r, g, b = color.r, color.g, color.b
end
else
if pfUI_config.unitframes.pastel == "1" then
r, g, b = (color.r + .5) * .5, (color.g + .5) * .5, (color.b + .5) * .5
else
r, g, b = color.r, color.g, color.b
end
pfUI.uf.target.hp.bar:SetStatusBarColor(r, g, b, hp / hpmax / 4 + .75)
end
pfUI.uf.target.powerText:SetTextColor(r, g, b, 1)
pfUI.uf.target.hp.bar:SetMinMaxValues(0, hpmax)
pfUI.uf.target.hp.bar:SetStatusBarColor(r, g, b, hp / hpmax / 4 + .75)
pfUI.uf.target.powerText:SetTextColor(r, g, b, 1)
local perc = hp / hpmax
local r1, g1, b1, r2, g2, b2