mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-15 17:50:48 +00:00
nameplates: add target nameplate glow
This commit is contained in:
@@ -1926,6 +1926,7 @@ pfUI:RegisterModule("gui", 20400, function ()
|
||||
CreateConfig(nil, T["Castbar Height"], C.nameplates, "heightcast")
|
||||
CreateConfig(nil, T["Enable Combo Point Display"], C.nameplates, "cpdisplay", "checkbox")
|
||||
CreateConfig(nil, T["Highlight Target Nameplate"], C.nameplates, "targethighlight", "checkbox")
|
||||
CreateConfig(nil, T["Draw Glow Around Target Nameplate"], C.nameplates, "targetglow", "checkbox")
|
||||
CreateConfig(nil, T["Zoom Target Nameplate"], C.nameplates, "targetzoom", "checkbox")
|
||||
end)
|
||||
|
||||
|
||||
@@ -155,6 +155,16 @@ pfUI:RegisterModule("nameplates", 20400, function ()
|
||||
this.healthbar.bgtarget:SetHeight(this.healthbar:GetHeight() + 5)
|
||||
end
|
||||
|
||||
if not this.healthbar.glowtarget then
|
||||
this.healthbar.glowtarget = this.nameplate:CreateTexture(nil, "BACKGROUND")
|
||||
this.healthbar.glowtarget:SetTexture("Interface\\AddOns\\pfUI\\img\\dot")
|
||||
this.healthbar.glowtarget:ClearAllPoints()
|
||||
this.healthbar.glowtarget:SetPoint("CENTER", this.healthbar, "CENTER", 0, 0)
|
||||
this.healthbar.glowtarget:SetWidth(this.healthbar:GetWidth() + 50)
|
||||
this.healthbar.glowtarget:SetHeight(this.healthbar:GetHeight() + 25)
|
||||
this.healthbar.glowtarget:SetVertexColor(1,1,1,1)
|
||||
end
|
||||
|
||||
this.healthbar.reaction = nil
|
||||
|
||||
-- level
|
||||
@@ -451,6 +461,13 @@ pfUI:RegisterModule("nameplates", 20400, function ()
|
||||
healthbar.bgtarget:Hide()
|
||||
end
|
||||
|
||||
-- glow target indicator
|
||||
if UnitExists("target") and healthbar:GetAlpha() == 1 and C.nameplates.targetglow == "1" then
|
||||
healthbar.glowtarget:Show()
|
||||
else
|
||||
healthbar.glowtarget:Hide()
|
||||
end
|
||||
|
||||
-- target zoom
|
||||
local w, h = healthbar:GetWidth(), healthbar:GetHeight()
|
||||
if UnitExists("target") and healthbar:GetAlpha() == 1 and C.nameplates.targetzoom == "1" then
|
||||
|
||||
Reference in New Issue
Block a user