From 06ddbcd34cbb96d9b6828d9309911b7a6dc574bb Mon Sep 17 00:00:00 2001 From: shagu Date: Wed, 27 Nov 2024 16:13:42 +0100 Subject: [PATCH] nameplates: add option to adjust debuff icon offset --- api/config.lua | 1 + modules/gui.lua | 3 ++- modules/nameplates.lua | 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/api/config.lua b/api/config.lua index c8669b12..3b5d0569 100644 --- a/api/config.lua +++ b/api/config.lua @@ -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") diff --git a/modules/gui.lua b/modules/gui.lua index bd44b29a..5a3a5750 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -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") diff --git a/modules/nameplates.lua b/modules/nameplates.lua index a5774f84..99094f3b 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -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)