nameplates: add option to set hp text position

This commit is contained in:
shagu
2021-01-03 16:13:10 +01:00
parent 1eaea3df1a
commit 2700f85283
3 changed files with 8 additions and 1 deletions
+1
View File
@@ -667,6 +667,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("nameplates", nil, "highlightcolor", "1,1,1,1")
pfUI:UpdateConfig("nameplates", nil, "showhp", "0")
pfUI:UpdateConfig("nameplates", nil, "hptextpos", "RIGHT")
pfUI:UpdateConfig("nameplates", nil, "alwaysperc", "0")
pfUI:UpdateConfig("nameplates", nil, "vpos", "-10")
pfUI:UpdateConfig("nameplates", nil, "width", "120")
+6
View File
@@ -1152,6 +1152,11 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
"-1:" .. T["Large"],
"-3:" .. T["Huge"],
},
["textalign"] = {
"LEFT:" .. T["Left"],
"CENTER:" .. T["Center"],
"RIGHT:" .. T["Right"],
},
}
-- add locale dependent client fonts to the list
@@ -2159,6 +2164,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
CreateConfig(U["nameplates"], T["Healthbar Height"], C.nameplates, "heighthealth")
CreateConfig(U["nameplates"], T["Healthbar Texture"], C.nameplates, "healthtexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture)
CreateConfig(U["nameplates"], T["Show Health Points"], C.nameplates, "showhp", "checkbox")
CreateConfig(U["nameplates"], T["Health Text Position"], C.nameplates, "hptextpos", "dropdown", pfUI.gui.dropdowns.textalign)
CreateConfig(U["nameplates"], T["Always Show Health In Percent"], C.nameplates, "alwaysperc", "checkbox")
CreateConfig(U["nameplates"], T["Hide Healthbar On Enemy NPCs"], C.nameplates, "enemynpc", "checkbox")
CreateConfig(U["nameplates"], T["Hide Healthbar On Enemy Players"], C.nameplates, "enemyplayer", "checkbox")
+1 -1
View File
@@ -393,7 +393,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
CreateBackdrop(nameplate.health, default_border)
nameplate.health.text:SetFont(font, font_size - 2, "OUTLINE")
nameplate.health.text:SetJustifyH("RIGHT")
nameplate.health.text:SetJustifyH(C.nameplates.hptextpos)
nameplate.glow:SetWidth(C.nameplates.width + 60)
nameplate.glow:SetHeight(C.nameplates.heighthealth + 30)