mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 18:36:01 +00:00
nameplates: add option to disable infight text color
This commit is contained in:
+1
-1
@@ -717,7 +717,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("nameplates", nil, "raidiconoffy", "-5")
|
||||
pfUI:UpdateConfig("nameplates", nil, "fullhealth", "1")
|
||||
pfUI:UpdateConfig("nameplates", nil, "target", "1")
|
||||
|
||||
pfUI:UpdateConfig("nameplates", nil, "namefightcolor", "1")
|
||||
pfUI:UpdateConfig("nameplates", nil, "enemynpc", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "enemyplayer", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "neutralnpc", "0")
|
||||
|
||||
@@ -2227,6 +2227,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
CreateConfig(U["nameplates"], T["Inactive Nameplate Alpha"], C.nameplates, "notargalpha", "dropdown", pfUI.gui.dropdowns.percent_small)
|
||||
CreateConfig(U["nameplates"], T["Draw Glow Around Target Nameplate"], C.nameplates, "targetglow", "checkbox")
|
||||
CreateConfig(U["nameplates"], T["Glow Color Around Target Nameplate"], C.nameplates, "glowcolor", "color")
|
||||
CreateConfig(U["nameplates"], T["Red Name Text On Infight Units"], C.nameplates, "namefightcolor", "checkbox")
|
||||
CreateConfig(U["nameplates"], T["Zoom Target Nameplate"], C.nameplates, "targetzoom", "checkbox")
|
||||
CreateConfig(U["nameplates"], T["Target Nameplate Zoom Factor"], C.nameplates, "targetzoomval", "dropdown", pfUI.gui.dropdowns.percent_small)
|
||||
CreateConfig(U["nameplates"], T["Nameplate Width"], C.nameplates, "width")
|
||||
|
||||
@@ -855,6 +855,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
||||
local name = original.name:GetText()
|
||||
local target = UnitExists("target") and frame:GetAlpha() == 1 or nil
|
||||
local mouseover = UnitExists("mouseover") and original.glow:IsShown() or nil
|
||||
local namefightcolor = C.nameplates.namefightcolor == "1"
|
||||
|
||||
-- trigger queued event update
|
||||
if nameplate.eventcache then
|
||||
@@ -909,10 +910,15 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
||||
local r, g, b = original.name:GetTextColor()
|
||||
if r + g + b ~= nameplate.cache.namecolor then
|
||||
nameplate.cache.namecolor = r + g + b
|
||||
if r > .9 and g < .2 and b < .2 then
|
||||
nameplate.name:SetTextColor(1,0.4,0.2,1) -- infight
|
||||
|
||||
if namefightcolor then
|
||||
if r > .9 and g < .2 and b < .2 then
|
||||
nameplate.name:SetTextColor(1,0.4,0.2,1) -- infight
|
||||
else
|
||||
nameplate.name:SetTextColor(r,g,b,1)
|
||||
end
|
||||
else
|
||||
nameplate.name:SetTextColor(r,g,b,1)
|
||||
nameplate.name:SetTextColor(1,1,1,1)
|
||||
end
|
||||
update = true
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user