diff --git a/api/config.lua b/api/config.lua index 466fbaf0..1a140898 100644 --- a/api/config.lua +++ b/api/config.lua @@ -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") diff --git a/api/unitframes.lua b/api/unitframes.lua index f1bbb687..44cc6ed1 100644 --- a/api/unitframes.lua +++ b/api/unitframes.lua @@ -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) diff --git a/img/bar_elvui.tga b/img/bar_elvui.tga new file mode 100644 index 00000000..996b2690 Binary files /dev/null and b/img/bar_elvui.tga differ diff --git a/img/bar_tukui.tga b/img/bar_tukui.tga new file mode 100644 index 00000000..2d998376 Binary files /dev/null and b/img/bar_tukui.tga differ diff --git a/modules/gui.lua b/modules/gui.lua index ac6a0a7f..5b0b32d3 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -406,6 +406,14 @@ pfUI:RegisterModule("gui", function () "13:" .. T["Very Slow"], } + pfUI.gui.dropdowns.uf_bartexture = { + "Interface\\AddOns\\pfUI\\img\\bar:pfUI", + "Interface\\AddOns\\pfUI\\img\\bar_tukui:TukUI", + "Interface\\AddOns\\pfUI\\img\\bar_elvui:ElvUI", + "Interface\\TargetingFrame\\UI-StatusBar:Wow Status", + "Interface\\PaperDollInfoFrame\\UI-Character-Skills-Bar:Wow Skill" + } + pfUI.gui.dropdowns.uf_rangecheckinterval = { "1:" .. T["Very Fast"], "2:" .. T["Fast"], @@ -728,6 +736,7 @@ pfUI:RegisterModule("gui", function () if not this.setup then CreateConfig(this, T["Display Player Frame"], C.unitframes.player, "visible", "checkbox") CreateConfig(this, T["Portrait Position"], C.unitframes.player, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) + CreateConfig(this, T["Status Bar Texture"], C.unitframes.player, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) CreateConfig(this, T["Health Bar Width"], C.unitframes.player, "width") CreateConfig(this, T["Health Bar Height"], C.unitframes.player, "height") CreateConfig(this, T["Power Bar Height"], C.unitframes.player, "pheight") @@ -772,6 +781,7 @@ pfUI:RegisterModule("gui", function () CreateConfig(this, T["Display Target Frame"], C.unitframes.target, "visible", "checkbox") CreateConfig(this, T["Enable Target Switch Animation"], C.unitframes.target, "animation", "checkbox") CreateConfig(this, T["Portrait Position"], C.unitframes.target, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) + CreateConfig(this, T["Status Bar Texture"], C.unitframes.target, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) CreateConfig(this, T["Health Bar Width"], C.unitframes.target, "width") CreateConfig(this, T["Health Bar Height"], C.unitframes.target, "height") CreateConfig(this, T["Power Bar Height"], C.unitframes.target, "pheight") @@ -815,6 +825,7 @@ pfUI:RegisterModule("gui", function () if not this.setup then CreateConfig(this, T["Display Target of Target Frame"], C.unitframes.ttarget, "visible", "checkbox") CreateConfig(this, T["Portrait Position"], C.unitframes.ttarget, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) + CreateConfig(this, T["Status Bar Texture"], C.unitframes.ttarget, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) CreateConfig(this, T["Health Bar Width"], C.unitframes.ttarget, "width") CreateConfig(this, T["Health Bar Height"], C.unitframes.ttarget, "height") CreateConfig(this, T["Power Bar Height"], C.unitframes.ttarget, "pheight") @@ -858,6 +869,7 @@ pfUI:RegisterModule("gui", function () if not this.setup then CreateConfig(this, T["Display Pet Frame"], C.unitframes.pet, "visible", "checkbox") CreateConfig(this, T["Portrait Position"], C.unitframes.pet, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) + CreateConfig(this, T["Status Bar Texture"], C.unitframes.pet, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) CreateConfig(this, T["Health Bar Width"], C.unitframes.pet, "width") CreateConfig(this, T["Health Bar Height"], C.unitframes.pet, "height") CreateConfig(this, T["Power Bar Height"], C.unitframes.pet, "pheight") @@ -901,6 +913,7 @@ pfUI:RegisterModule("gui", function () if not this.setup then CreateConfig(this, T["Display Focus Frame"], C.unitframes.focus, "visible", "checkbox") CreateConfig(this, T["Portrait Position"], C.unitframes.focus, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) + CreateConfig(this, T["Status Bar Texture"], C.unitframes.focus, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) CreateConfig(this, T["Health Bar Width"], C.unitframes.focus, "width") CreateConfig(this, T["Health Bar Height"], C.unitframes.focus, "height") CreateConfig(this, T["Power Bar Height"], C.unitframes.focus, "pheight") @@ -970,6 +983,7 @@ pfUI:RegisterModule("gui", function () if not this.setup then CreateConfig(this, T["Display Raid Frames"], C.unitframes.raid, "visible", "checkbox") CreateConfig(this, T["Portrait Position"], C.unitframes.raid, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) + CreateConfig(this, T["Status Bar Texture"], C.unitframes.raid, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) CreateConfig(this, T["Health Bar Width"], C.unitframes.raid, "width") CreateConfig(this, T["Health Bar Height"], C.unitframes.raid, "height") CreateConfig(this, T["Power Bar Height"], C.unitframes.raid, "pheight") @@ -1013,6 +1027,7 @@ pfUI:RegisterModule("gui", function () if not this.setup then CreateConfig(this, T["Display Group Frames"], C.unitframes.group, "visible", "checkbox") CreateConfig(this, T["Portrait Position"], C.unitframes.group, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) + CreateConfig(this, T["Status Bar Texture"], C.unitframes.group, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) CreateConfig(this, T["Health Bar Width"], C.unitframes.group, "width") CreateConfig(this, T["Health Bar Height"], C.unitframes.group, "height") CreateConfig(this, T["Power Bar Height"], C.unitframes.group, "pheight") @@ -1056,6 +1071,7 @@ pfUI:RegisterModule("gui", function () if not this.setup then CreateConfig(this, T["Display Group Target Frames"], C.unitframes.grouptarget, "visible", "checkbox") CreateConfig(this, T["Portrait Position"], C.unitframes.grouptarget, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) + CreateConfig(this, T["Status Bar Texture"], C.unitframes.grouptarget, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) CreateConfig(this, T["Health Bar Width"], C.unitframes.grouptarget, "width") CreateConfig(this, T["Health Bar Height"], C.unitframes.grouptarget, "height") CreateConfig(this, T["Power Bar Height"], C.unitframes.grouptarget, "pheight") @@ -1099,6 +1115,7 @@ pfUI:RegisterModule("gui", function () if not this.setup then CreateConfig(this, T["Display Group Pet Frames"], C.unitframes.grouppet, "visible", "checkbox") CreateConfig(this, T["Portrait Position"], C.unitframes.grouppet, "portrait", "dropdown", pfUI.gui.dropdowns.uf_portrait_position) + CreateConfig(this, T["Status Bar Texture"], C.unitframes.grouppet, "bartexture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) CreateConfig(this, T["Health Bar Width"], C.unitframes.grouppet, "width") CreateConfig(this, T["Health Bar Height"], C.unitframes.grouppet, "height") CreateConfig(this, T["Power Bar Height"], C.unitframes.grouppet, "pheight")