diff --git a/api/config.lua b/api/config.lua index fde40970..081de7d3 100644 --- a/api/config.lua +++ b/api/config.lua @@ -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") diff --git a/modules/gui.lua b/modules/gui.lua index 9c40ef8f..ff432c86 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -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") diff --git a/modules/nameplates.lua b/modules/nameplates.lua index 23f18788..1a1c7220 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -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)