mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-24 00:26:55 +00:00
nameplates: add option to set hp text position
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user