mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-03 20:20:01 +00:00
uf: add option for dark and non-pastel colors
This commit is contained in:
+17
-3
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user