From 02f07ec98d3ed31b33b917ab68066685681aa23a Mon Sep 17 00:00:00 2001 From: Mr_Rosh Date: Tue, 4 Feb 2025 19:24:40 +0200 Subject: [PATCH] xpbar: add option to select texture --- api/config.lua | 1 + modules/gui.lua | 1 + modules/xpbar.lua | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/api/config.lua b/api/config.lua index fa00d900..68acec3f 100644 --- a/api/config.lua +++ b/api/config.lua @@ -595,6 +595,7 @@ function pfUI:LoadConfig() pfUI:UpdateConfig("panel", "xp", "xp_position", "RIGHT") pfUI:UpdateConfig("panel", "xp", "xp_color", ".25,.25,1,1") pfUI:UpdateConfig("panel", "xp", "rest_color", "1,.25,1,.5") + pfUI:UpdateConfig("panel", "xp", "texture", "Interface\\AddOns\\pfUI\\img\\bar") pfUI:UpdateConfig("panel", "xp", "rep_always", "0") pfUI:UpdateConfig("panel", "xp", "rep_display", "REP") diff --git a/modules/gui.lua b/modules/gui.lua index d3857fbd..7ec65730 100644 --- a/modules/gui.lua +++ b/modules/gui.lua @@ -2099,6 +2099,7 @@ pfUI:RegisterModule("gui", "vanilla:tbc", function () CreateConfig(nil, T["Colors"], nil, nil, "header") CreateConfig(U["xpbar"], T["Experience Color"], C.panel.xp, "xp_color", "color") CreateConfig(U["xpbar"], T["Rested Color"], C.panel.xp, "rest_color", "color") + CreateConfig(U["xpbar"], T["Bar Texture"], C.panel.xp, "texture", "dropdown", pfUI.gui.dropdowns.uf_bartexture) end) CreateGUIEntry(T["XP Bar"], T["Reputation Bar"], function() diff --git a/modules/xpbar.lua b/modules/xpbar.lua index 97f91d61..e985bdb8 100644 --- a/modules/xpbar.lua +++ b/modules/xpbar.lua @@ -242,7 +242,7 @@ end CreateBackdropShadow(b) b.bar = b.bar or CreateFrame("StatusBar", nil, b) - b.bar:SetStatusBarTexture(pfUI.media["img:bar"]) + b.bar:SetStatusBarTexture(pfUI.media[C.panel.xp.texture]) b.bar:ClearAllPoints() b.bar:SetAllPoints(b) b.bar:SetFrameLevel(barLevel) @@ -252,7 +252,7 @@ end b.bar:SetOrientation(b.mode) b.restedbar = b.restedbar or CreateFrame("StatusBar", nil, b) - b.restedbar:SetStatusBarTexture(pfUI.media["img:bar"]) + b.restedbar:SetStatusBarTexture(pfUI.media[C.panel.xp.texture]) b.restedbar:ClearAllPoints() b.restedbar:SetAllPoints(b) b.restedbar:SetFrameLevel(restedLevel)