From 8e64a38388a707e941584cdd7af859a8bb73480c Mon Sep 17 00:00:00 2001 From: shagu Date: Wed, 1 May 2019 16:33:07 +0200 Subject: [PATCH] nameplates: add target nameplate glow --- api/config.lua | 1 + img/dot.tga | Bin 0 -> 280 bytes modules/gui.lua | 1 + modules/nameplates.lua | 17 +++++++++++++++++ 4 files changed, 19 insertions(+) create mode 100644 img/dot.tga diff --git a/api/config.lua b/api/config.lua index 44fd628b..50e2a03b 100644 --- a/api/config.lua +++ b/api/config.lua @@ -1008,6 +1008,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, "targetglow", "1") pfUI:UpdateConfig("nameplates", nil, "targetzoom", "0") pfUI:UpdateConfig("abuttons", nil, "enable", "0") diff --git a/img/dot.tga b/img/dot.tga new file mode 100644 index 0000000000000000000000000000000000000000..6c0ece32dfde6789fc8fa6bd48257c59bad48161 GIT binary patch literal 280 zcmZQz;9`IQ4h9Ye1&+r5|Nk>E00|}#iv!MLU;;^ign(EBB>tjAnUMt3Fh;VpitK^&tOk~Kivp7 JPaju31^|CKvf=;$ literal 0 HcmV?d00001 diff --git a/modules/gui.lua b/modules/gui.lua index c7016296..fbfe610c 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -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) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index 087be7a2..7716592e 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -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