nameplates: align name to healthbar where possible

This commit is contained in:
shagu
2020-05-22 11:29:12 +02:00
parent 8511b704a9
commit 9bb9645ee0
+3 -1
View File
@@ -224,7 +224,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
nameplate.health.text:SetAllPoints()
nameplate.health.text:SetTextColor(1,1,1,1)
nameplate.name = nameplate.health:CreateFontString(nil, "OVERLAY")
nameplate.name = nameplate:CreateFontString(nil, "OVERLAY")
nameplate.name:SetPoint("TOP", nameplate, "TOP", 0, nameoffset)
nameplate.glow = nameplate:CreateTexture(nil, "BACKGROUND")
@@ -465,9 +465,11 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
-- hide frames according to the configuration
if HidePlate(unittype, name, (hpmax-hp == hpmin), target) then
plate.level:SetPoint("RIGHT", plate.name, "LEFT", -3, 0)
plate.name:SetParent(plate)
plate.health:Hide()
else
plate.level:SetPoint("RIGHT", plate.health, "LEFT", -3, 0)
plate.name:SetParent(plate.health)
plate.health:Show()
end