unitframes: add option to select bar textures

This commit is contained in:
shagu
2018-01-05 21:00:24 +01:00
parent 6a016ad7ca
commit bc238a85b1
5 changed files with 29 additions and 2 deletions
+10
View File
@@ -108,6 +108,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", "player", "visible", "1")
pfUI:UpdateConfig("unitframes", "player", "portrait", "bar")
pfUI:UpdateConfig("unitframes", "player", "bartexture", "Interface\\AddOns\\pfUI\\img\\bar")
pfUI:UpdateConfig("unitframes", "player", "width", "200")
pfUI:UpdateConfig("unitframes", "player", "height", "50")
pfUI:UpdateConfig("unitframes", "player", "pheight", "10")
@@ -146,6 +147,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", "target", "visible", "1")
pfUI:UpdateConfig("unitframes", "target", "portrait", "bar")
pfUI:UpdateConfig("unitframes", "target", "bartexture", "Interface\\AddOns\\pfUI\\img\\bar")
pfUI:UpdateConfig("unitframes", "target", "width", "200")
pfUI:UpdateConfig("unitframes", "target", "height", "50")
pfUI:UpdateConfig("unitframes", "target", "pheight", "10")
@@ -181,6 +183,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", "focus", "visible", "1")
pfUI:UpdateConfig("unitframes", "focus", "portrait", "bar")
pfUI:UpdateConfig("unitframes", "focus", "bartexture", "Interface\\AddOns\\pfUI\\img\\bar")
pfUI:UpdateConfig("unitframes", "focus", "width", "120")
pfUI:UpdateConfig("unitframes", "focus", "height", "34")
pfUI:UpdateConfig("unitframes", "focus", "pheight", "4")
@@ -215,6 +218,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", "group", "visible", "1")
pfUI:UpdateConfig("unitframes", "group", "portrait", "off")
pfUI:UpdateConfig("unitframes", "group", "bartexture", "Interface\\AddOns\\pfUI\\img\\bar")
pfUI:UpdateConfig("unitframes", "group", "width", "164")
pfUI:UpdateConfig("unitframes", "group", "height", "32")
pfUI:UpdateConfig("unitframes", "group", "pheight", "4")
@@ -250,6 +254,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", "grouptarget", "visible", "1")
pfUI:UpdateConfig("unitframes", "grouptarget", "portrait", "off")
pfUI:UpdateConfig("unitframes", "grouptarget", "bartexture", "Interface\\AddOns\\pfUI\\img\\bar")
pfUI:UpdateConfig("unitframes", "grouptarget", "width", "120")
pfUI:UpdateConfig("unitframes", "grouptarget", "height", "16")
pfUI:UpdateConfig("unitframes", "grouptarget", "pheight", "0")
@@ -284,6 +289,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", "grouppet", "visible", "1")
pfUI:UpdateConfig("unitframes", "grouppet", "portrait", "off")
pfUI:UpdateConfig("unitframes", "grouppet", "bartexture", "Interface\\AddOns\\pfUI\\img\\bar")
pfUI:UpdateConfig("unitframes", "grouppet", "width", "100")
pfUI:UpdateConfig("unitframes", "grouppet", "height", "14")
pfUI:UpdateConfig("unitframes", "grouppet", "pheight", "0")
@@ -318,6 +324,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", "raid", "visible", "1")
pfUI:UpdateConfig("unitframes", "raid", "portrait", "off")
pfUI:UpdateConfig("unitframes", "raid", "bartexture", "Interface\\AddOns\\pfUI\\img\\bar")
pfUI:UpdateConfig("unitframes", "raid", "width", "50")
pfUI:UpdateConfig("unitframes", "raid", "height", "26")
pfUI:UpdateConfig("unitframes", "raid", "pheight", "4")
@@ -352,6 +359,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", "ttarget", "visible", "1")
pfUI:UpdateConfig("unitframes", "ttarget", "portrait", "bar")
pfUI:UpdateConfig("unitframes", "ttarget", "bartexture", "Interface\\AddOns\\pfUI\\img\\bar")
pfUI:UpdateConfig("unitframes", "ttarget", "width", "100")
pfUI:UpdateConfig("unitframes", "ttarget", "height", "20")
pfUI:UpdateConfig("unitframes", "ttarget", "pheight", "3")
@@ -386,6 +394,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", "pet", "visible", "1")
pfUI:UpdateConfig("unitframes", "pet", "portrait", "bar")
pfUI:UpdateConfig("unitframes", "pet", "bartexture", "Interface\\AddOns\\pfUI\\img\\bar")
pfUI:UpdateConfig("unitframes", "pet", "width", "100")
pfUI:UpdateConfig("unitframes", "pet", "height", "16")
pfUI:UpdateConfig("unitframes", "pet", "pheight", "4")
@@ -420,6 +429,7 @@ function pfUI:LoadConfig()
pfUI:UpdateConfig("unitframes", "fallback", "visible", "1")
pfUI:UpdateConfig("unitframes", "fallback", "portrait", "bar")
pfUI:UpdateConfig("unitframes", "fallback", "bartexture", "Interface\\AddOns\\pfUI\\img\\bar")
pfUI:UpdateConfig("unitframes", "fallback", "width", "200")
pfUI:UpdateConfig("unitframes", "fallback", "height", "50")
pfUI:UpdateConfig("unitframes", "fallback", "pheight", "10")
+2 -2
View File
@@ -92,7 +92,7 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
pfUI.api.CreateBackdrop(f.hp, default_border)
f.hp.bar = CreateFrame("StatusBar", nil, f.hp)
f.hp.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
f.hp.bar:SetStatusBarTexture(f.config.bartexture)
f.hp.bar:SetAllPoints(f.hp)
if f.config.verticalbar == "1" then
f.hp.bar:SetOrientation("VERTICAL")
@@ -148,7 +148,7 @@ function pfUI.uf:CreateUnitFrame(unit, id, config, tick)
pfUI.api.CreateBackdrop(f.power, default_border)
f.power.bar = CreateFrame("StatusBar", nil, f.power)
f.power.bar:SetStatusBarTexture("Interface\\AddOns\\pfUI\\img\\bar")
f.power.bar:SetStatusBarTexture(f.config.bartexture)
f.power.bar:SetAllPoints(f.power)
f.power.bar:SetMinMaxValues(0, 100)