nameplates: add option for name font style

This commit is contained in:
shagu
2020-05-21 19:02:52 +02:00
parent 8c8f90a14c
commit abbb6c3833
3 changed files with 10 additions and 1 deletions
+1
View File
@@ -644,6 +644,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("nameplates", nil, "targetzoom", "0")
pfUI:UpdateConfig("nameplates", nil, "notargalpha", ".75")
pfUI:UpdateConfig("nameplates", nil, "healthtexture", "Interface\\AddOns\\pfUI\\img\\bar")
pfUI:UpdateConfig("nameplates", "name", "fontstyle", "OUTLINE")
pfUI:UpdateConfig("nameplates", "debuffs", "filter", "none")
pfUI:UpdateConfig("nameplates", "debuffs", "whitelist", "")
pfUI:UpdateConfig("nameplates", "debuffs", "blacklist", "")
+7
View File
@@ -848,6 +848,12 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
"4:4 " .. T["Pixel"],
"5:5 " .. T["Pixel"],
},
["fontstyle"] = {
"NONE:" .. T["None"],
"OUTLINE:" .. T["Outline"],
"THICKOUTLINE:" .. T["Thick Outline"],
"MONOCHROME:" .. T["Monochrome"],
},
["spacing"] = {
"0:0" .. T["None"],
"1:1 " .. T["Pixel"],
@@ -2043,6 +2049,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
CreateConfig(U["nameplates"], T["Enable Mouselook With Right Click"], C.nameplates, "rightclick", "checkbox", nil, nil, nil, nil, "vanilla")
CreateConfig(U["nameplates"], T["Right Click Auto Attack Threshold"], C.nameplates, "clickthreshold", nil, nil, nil, nil, nil, "vanilla")
CreateConfig(U["nameplates"], T["Use Unit Fonts"], C.nameplates, "use_unitfonts", "checkbox")
CreateConfig(U["nameplates"], T["Name Font Style"], C.nameplates.name, "fontstyle", "dropdown", pfUI.gui.dropdowns.fontstyle)
CreateConfig(nil, T["Castbar"], nil, nil, "header")
CreateConfig(U["nameplates"], T["Enable Castbars"], C.nameplates, "showcastbar", "checkbox")
+2 -1
View File
@@ -329,6 +329,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
local font = C.nameplates.use_unitfonts == "1" and pfUI.font_unit or pfUI.font_default
local font_size = C.nameplates.use_unitfonts == "1" and C.global.font_unit_size or C.global.font_size
local font_style = C.nameplates.name.fontstyle
local glowr, glowg, glowb, glowa = GetStringColor(C.nameplates.glowcolor)
local hptexture = pfUI.media[C.nameplates.healthtexture]
local rawborder, default_border = GetBorderSize("nameplates")
@@ -345,7 +346,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
nameplate:SetHeight(plate_height)
nameplate:SetPoint("TOP", parent, "TOP", 0, 0)
nameplate.name:SetFont(font, font_size, "OUTLINE")
nameplate.name:SetFont(font, font_size, font_style)
nameplate.health:SetStatusBarTexture(hptexture)
nameplate.health:SetWidth(C.nameplates.width)