From 28acb575c91f46d1518d47da8d2dac6bc543a2ed Mon Sep 17 00:00:00 2001 From: shagu Date: Thu, 21 May 2020 19:13:03 +0200 Subject: [PATCH] nameplates: add option to set healthbar offset --- api/config.lua | 1 + modules/gui.lua | 1 + modules/nameplates.lua | 2 ++ 3 files changed, 4 insertions(+) diff --git a/api/config.lua b/api/config.lua index cf844a2f..0fa26636 100644 --- a/api/config.lua +++ b/api/config.lua @@ -645,6 +645,7 @@ function pfUI:LoadConfig() 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", "health", "offset", "-3") pfUI:UpdateConfig("nameplates", "debuffs", "filter", "none") pfUI:UpdateConfig("nameplates", "debuffs", "whitelist", "") pfUI:UpdateConfig("nameplates", "debuffs", "blacklist", "") diff --git a/modules/gui.lua b/modules/gui.lua index 1ff62f24..bbecdd2e 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2065,6 +2065,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(U["nameplates"], T["Whitelist"], C.nameplates.debuffs, "whitelist", "list") CreateConfig(nil, T["Healthbar"], nil, nil, "header") + CreateConfig(U["nameplates"], T["Healthbar Vertical Offset"], C.nameplates.health, "offset") 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") diff --git a/modules/nameplates.lua b/modules/nameplates.lua index a223767f..aa3adedd 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -340,6 +340,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () local width = tonumber(C.nameplates.width) local debuffsize = tonumber(C.nameplates.debuffsize) + local healthoffset = tonumber(C.nameplates.health.offset) nameplate:SetWidth(plate_width) nameplate:SetHeight(plate_height) @@ -347,6 +348,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function () nameplate.name:SetFont(font, font_size, font_style) + nameplate.health:SetPoint("TOP", nameplate.name, "BOTTOM", 0, healthoffset) nameplate.health:SetStatusBarTexture(hptexture) nameplate.health:SetWidth(C.nameplates.width) nameplate.health:SetHeight(C.nameplates.heighthealth)