nameplates: configurable sizes

This commit is contained in:
shagu
2017-05-28 21:50:20 +02:00
parent ae291b3165
commit a7e3ae6e1b
3 changed files with 16 additions and 7 deletions
+4 -1
View File
@@ -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")
+3
View File
@@ -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")
+9 -6
View File
@@ -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