diff --git a/api/config.lua b/api/config.lua index 353240f1..713b529d 100644 --- a/api/config.lua +++ b/api/config.lua @@ -202,7 +202,10 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("nameplates", nil, "raidiconsize", "16") pfUI:UpdateConfig("nameplates", nil, "players", "0") pfUI:UpdateConfig("nameplates", nil, "showhp", "0") - pfUI:UpdateConfig("nameplates", nil, "vpos", "-10") + pfUI:UpdateConfig("nameplates", nil, "vpos", "-10") + pfUI:UpdateConfig("nameplates", nil, "width", "100") + pfUI:UpdateConfig("nameplates", nil, "heighthealth", "6") + pfUI:UpdateConfig("nameplates", nil, "heightcast", "6") pfUI:UpdateConfig("thirdparty", "dpsmate", "enable", "1") pfUI:UpdateConfig("thirdparty", "wim", "enable", "1") pfUI:UpdateConfig("thirdparty", "healcomm", "enable", "1") diff --git a/modules/gui.lua b/modules/gui.lua index f817571f..6aedcdf5 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -1017,6 +1017,9 @@ pfUI:RegisterModule("gui", function () pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show Players Only", C.nameplates, "players", "checkbox") pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Show Health Points", C.nameplates, "showhp", "checkbox") pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Vertical Position", C.nameplates, "vpos") + pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Nameplate Width", C.nameplates, "width") + pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Healthbar Height", C.nameplates, "heighthealth") + pfUI.gui:CreateConfig(pfUI.gui.nameplates, "Castbar Height", C.nameplates, "heightcast") -- thirdparty pfUI.gui.thirdparty = pfUI.gui:CreateConfigTab("Thirdparty") diff --git a/modules/nameplates.lua b/modules/nameplates.lua index efd9dc6c..72e8f433 100644 --- a/modules/nameplates.lua +++ b/modules/nameplates.lua @@ -46,12 +46,15 @@ pfUI:RegisterModule("nameplates", function () end end + -- set width + this:SetWidth(C.nameplates.width) + -- healthbar healthbar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar") healthbar:ClearAllPoints() healthbar:SetPoint("TOP", this, "TOP", 0, tonumber(C.nameplates.vpos)) - healthbar:SetWidth(110) - healthbar:SetHeight(7) + healthbar:SetWidth(this:GetWidth()) + healthbar:SetHeight(C.nameplates.heighthealth) if healthbar.bg == nil then healthbar.bg = healthbar:CreateTexture(nil, "BORDER") @@ -115,8 +118,8 @@ pfUI:RegisterModule("nameplates", function () if healthbar.castbar == nil then healthbar.castbar = CreateFrame("StatusBar", nil, healthbar) healthbar.castbar:Hide() - healthbar.castbar:SetWidth(110) - healthbar.castbar:SetHeight(7) + healthbar.castbar:SetWidth(healthbar:GetWidth()) + healthbar.castbar:SetHeight(C.nameplates.heightcast) healthbar.castbar:SetPoint("TOPLEFT", healthbar, "BOTTOMLEFT", 0, -5) healthbar.castbar:SetBackdrop({ bgFile = [[Interface\Tooltips\UI-Tooltip-Background]], insets = {left = -1, right = -1, top = -1, bottom = -1} }) @@ -155,8 +158,8 @@ pfUI:RegisterModule("nameplates", function () healthbar.castbar.icon = healthbar.castbar:CreateTexture(nil, "BORDER") healthbar.castbar.icon:ClearAllPoints() healthbar.castbar.icon:SetPoint("BOTTOMLEFT", healthbar.castbar, "BOTTOMRIGHT", 5, 0) - healthbar.castbar.icon:SetWidth(18) - healthbar.castbar.icon:SetHeight(18) + healthbar.castbar.icon:SetWidth(C.nameplates.heightcast + 5 + C.nameplates.heighthealth) + healthbar.castbar.icon:SetHeight(C.nameplates.heightcast + 5 + C.nameplates.heighthealth) end if healthbar.castbar.icon.bg == nil then