mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-25 00:56:02 +00:00
nameplates: add option to adjust debuff icon offset
This commit is contained in:
@@ -734,6 +734,7 @@ function pfUI:LoadConfig()
|
||||
pfUI:UpdateConfig("nameplates", nil, "vpos", "-10")
|
||||
pfUI:UpdateConfig("nameplates", nil, "width", "120")
|
||||
pfUI:UpdateConfig("nameplates", nil, "debuffsize", "14")
|
||||
pfUI:UpdateConfig("nameplates", nil, "debuffoffset", "4")
|
||||
pfUI:UpdateConfig("nameplates", nil, "heighthealth", "8")
|
||||
pfUI:UpdateConfig("nameplates", nil, "heightcast", "8")
|
||||
pfUI:UpdateConfig("nameplates", nil, "cpdisplay", "0")
|
||||
|
||||
+2
-1
@@ -2238,8 +2238,9 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function ()
|
||||
CreateConfig(nil, T["Debuffs"], nil, nil, "header")
|
||||
CreateConfig(U["nameplates"], T["Enable Debuffs"], C.nameplates, "showdebuffs", "checkbox")
|
||||
CreateConfig(U["nameplates"], T["Debuff Position"], C.nameplates.debuffs, "position", "dropdown", pfUI.gui.dropdowns.debuffposition)
|
||||
CreateConfig(U["nameplates"], T["Estimate Debuffs"], C.nameplates, "guessdebuffs", "checkbox")
|
||||
CreateConfig(U["nameplates"], T["Debuff Icon Offset"], C.nameplates, "debuffoffset")
|
||||
CreateConfig(U["nameplates"], T["Debuff Icon Size"], C.nameplates, "debuffsize")
|
||||
CreateConfig(U["nameplates"], T["Estimate Debuffs"], C.nameplates, "guessdebuffs", "checkbox")
|
||||
CreateConfig(U["nameplates"], T["Show Debuff Stacks"], C.nameplates.debuffs, "showstacks", "checkbox")
|
||||
CreateConfig(U["nameplates"], T["Filter Mode"], C.nameplates.debuffs, "filter", "dropdown", pfUI.gui.dropdowns.buffbarfilter)
|
||||
CreateConfig(U["nameplates"], T["Blacklist"], C.nameplates.debuffs, "blacklist", "list")
|
||||
|
||||
@@ -216,6 +216,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
||||
-- update debuff positions
|
||||
local width = tonumber(C.nameplates.width)
|
||||
local debuffsize = tonumber(C.nameplates.debuffsize)
|
||||
local debuffoffset = tonumber(C.nameplates.debuffoffset)
|
||||
local limit = floor(width / debuffsize)
|
||||
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
|
||||
@@ -223,9 +224,9 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
||||
|
||||
local aligna, alignb, offs, space
|
||||
if C.nameplates.debuffs["position"] == "BOTTOM" then
|
||||
aligna, alignb, offs, space = "TOPLEFT", "BOTTOMLEFT", -4, -1
|
||||
aligna, alignb, offs, space = "TOPLEFT", "BOTTOMLEFT", -debuffoffset, -1
|
||||
else
|
||||
aligna, alignb, offs, space = "BOTTOMLEFT", "TOPLEFT", 4, 1
|
||||
aligna, alignb, offs, space = "BOTTOMLEFT", "TOPLEFT", debuffoffset, 1
|
||||
end
|
||||
|
||||
nameplate.debuffs[i].stacks:SetFont(font, font_size, font_style)
|
||||
|
||||
Reference in New Issue
Block a user