diff --git a/api/config.lua b/api/config.lua index b8c95ee6..bf26d9c7 100644 --- a/api/config.lua +++ b/api/config.lua @@ -689,6 +689,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("nameplates", nil, "use_unitfonts", "0") pfUI:UpdateConfig("nameplates", nil, "legacy", "0") pfUI:UpdateConfig("nameplates", nil, "overlap", "0") + pfUI:UpdateConfig("nameplates", nil, "vertical_offset", "0") pfUI:UpdateConfig("nameplates", nil, "showcastbar", "1") pfUI:UpdateConfig("nameplates", nil, "targetcastbar", "0") pfUI:UpdateConfig("nameplates", nil, "spellname", "0") diff --git a/modules/gui.lua b/modules/gui.lua index 36cc6616..e0599d8a 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2201,6 +2201,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateGUIEntry(T["Nameplates"], nil, function() CreateConfig(U["nameplates"], T["Show On Hostile Units"], C.nameplates, "showhostile", "checkbox") CreateConfig(U["nameplates"], T["Show On Friendly Units"], C.nameplates, "showfriendly", "checkbox") + CreateConfig(U["nameplates"], T["Vertical Offset (|cffffaaaaExperimental|r)"], C.nameplates, "vertical_offset", nil, nil, nil, nil, nil, "vanilla") CreateConfig(U["nameplates"], T["Inactive Nameplate Alpha"], C.nameplates, "notargalpha", "dropdown", pfUI.gui.dropdowns.percent_small) CreateConfig(U["nameplates"], T["Draw Glow Around Target Nameplate"], C.nameplates, "targetglow", "checkbox") CreateConfig(U["nameplates"], T["Glow Color Around Target Nameplate"], C.nameplates, "glowcolor", "color") diff --git a/modules/nameplates.lua b/modules/nameplates.lua index 124c0a34..cb103ec7 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -322,7 +322,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () nameplate.health.text:SetTextColor(1,1,1,1) nameplate.name = nameplate:CreateFontString(nil, "OVERLAY") - nameplate.name:SetPoint("TOP", nameplate, "TOP", 0, nameoffset) + nameplate.name:SetPoint("TOP", nameplate, "TOP", 0, 0) nameplate.glow = nameplate:CreateTexture(nil, "BACKGROUND") nameplate.glow:SetPoint("CENTER", nameplate.health, "CENTER", 0, 0) @@ -1019,8 +1019,12 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () local nameplate = self.nameplate local plate = C.nameplates["overlap"] == "1" and nameplate or parent + if C.nameplates["vertical_offset"] ~= "0" then + nameplate:SetPoint("TOP", plate, "TOP", 0, tonumber(C.nameplates["vertical_offset"])) + end + -- replace clickhandler - if C.nameplates["overlap"] == "1" then + if C.nameplates["overlap"] == "1" or C.nameplates["vertical_offset"] ~= "0" then parent:SetFrameLevel(0) nameplate:SetScript("OnClick", function() parent:Click() end) @@ -1040,6 +1044,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () -- disable click event on frames if C.nameplates["clickthrough"] == "1" then + nameplate:EnableMouse(false) plate:EnableMouse(false) else plate:EnableMouse(true)