From 8489a9b01de9f0fe790d98c921babece26a17d6f Mon Sep 17 00:00:00 2001 From: shagu Date: Fri, 1 Jun 2018 10:17:29 +0200 Subject: [PATCH] nameplates: add target indicator --- modules/nameplates.lua | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/nameplates.lua b/modules/nameplates.lua index a19dfad8..470f6ab3 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -159,6 +159,15 @@ pfUI:RegisterModule("nameplates", function () this.healthbar.bg:SetHeight(this.healthbar:GetHeight() + 3) end + if not this.healthbar.bgtarget then + this.healthbar.bgtarget = this.healthbar:CreateTexture(nil, "BACKGROUND") + this.healthbar.bgtarget:SetTexture(1,1,1,0.90) + this.healthbar.bgtarget:ClearAllPoints() + this.healthbar.bgtarget:SetPoint("CENTER", this.healthbar, "CENTER", 0, 0) + this.healthbar.bgtarget:SetWidth(this.healthbar:GetWidth() + 5) + this.healthbar.bgtarget:SetHeight(this.healthbar:GetHeight() + 5) + end + this.healthbar.reaction = nil -- level @@ -465,6 +474,13 @@ pfUI:RegisterModule("nameplates", function () name:SetTextColor(1,1,1,0.85) end + -- target indicator + if UnitExists("target") and healthbar:GetAlpha() == 1 then + healthbar.bgtarget:Show() + else + healthbar.bgtarget:Hide() + end + -- update combopoints if combopoints and C.nameplates.cpdisplay == "1" then for point=1, 5 do