mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-28 10:26:02 +00:00
nameplates: add option to set highlight color
This commit is contained in:
@@ -653,6 +653,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("nameplates", nil, "heightcast", "8")
|
||||
pfUI:UpdateConfig("nameplates", nil, "cpdisplay", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "targethighlight", "0")
|
||||
pfUI:UpdateConfig("nameplates", nil, "highlightcolor", "1,1,1,1")
|
||||
pfUI:UpdateConfig("nameplates", nil, "targetglow", "1")
|
||||
pfUI:UpdateConfig("nameplates", nil, "glowcolor", "1,1,1,1")
|
||||
pfUI:UpdateConfig("nameplates", nil, "targetzoom", "0")
|
||||
|
||||
@@ -2086,6 +2086,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
CreateConfig(U["nameplates"], T["Show On Friendly Units"], C.nameplates, "showfriendly", "checkbox")
|
||||
CreateConfig(U["nameplates"], T["Inactive Nameplate Alpha"], C.nameplates, "notargalpha", "dropdown", pfUI.gui.dropdowns.percent_small)
|
||||
CreateConfig(U["nameplates"], T["Draw Border Around Target Nameplate"], C.nameplates, "targethighlight", "checkbox")
|
||||
CreateConfig(U["nameplates"], T["Border Color Around Target Nameplate"], C.nameplates, "highlightcolor", "color")
|
||||
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["Zoom Target Nameplate"], C.nameplates, "targetzoom", "checkbox")
|
||||
|
||||
@@ -339,6 +339,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
||||
local font_size = C.nameplates.use_unitfonts == "1" and C.global.font_unit_size or C.global.font_size
|
||||
local font_style = C.nameplates.name.fontstyle
|
||||
local glowr, glowg, glowb, glowa = GetStringColor(C.nameplates.glowcolor)
|
||||
local hlr, hlg, hlb, hla = GetStringColor(C.nameplates.highlightcolor)
|
||||
local hptexture = pfUI.media[C.nameplates.healthtexture]
|
||||
local rawborder, default_border = GetBorderSize("nameplates")
|
||||
|
||||
@@ -361,6 +362,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
||||
nameplate.health:SetStatusBarTexture(hptexture)
|
||||
nameplate.health:SetWidth(C.nameplates.width)
|
||||
nameplate.health:SetHeight(C.nameplates.heighthealth)
|
||||
nameplate.health.hlr, nameplate.health.hlg, nameplate.health.hlb, nameplate.health.hla = hlr, hlg, hlb, hla
|
||||
CreateBackdrop(nameplate.health, default_border)
|
||||
|
||||
nameplate.health.text:SetFont(font, font_size - 2, "OUTLINE")
|
||||
@@ -459,7 +461,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
||||
|
||||
-- target indicator
|
||||
if target and C.nameplates.targethighlight == "1" then
|
||||
plate.health.backdrop:SetBackdropBorderColor(1,1,1,1)
|
||||
plate.health.backdrop:SetBackdropBorderColor(plate.health.hlr, plate.health.hlg, plate.health.hlb, plate.health.hla)
|
||||
else
|
||||
plate.health.backdrop:SetBackdropBorderColor(er,eg,eb,ea)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user