From b22b318ad8a4be7e1c6219deec44f35ef2bd8d6d Mon Sep 17 00:00:00 2001 From: Vollmer Date: Tue, 17 Sep 2024 11:43:30 +0200 Subject: [PATCH] [Feature] Add Cell Shield texture --- Menu/Builder.lua | 1 + Widgets/Bars/ShieldBar.lua | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/Menu/Builder.lua b/Menu/Builder.lua index beadf7c..813e903 100644 --- a/Menu/Builder.lua +++ b/Menu/Builder.lua @@ -1047,6 +1047,7 @@ end ----------------------------------------------- local LSM = LibStub("LibSharedMedia-3.0", true) +LSM:Register("statusbar", "Cell Shield", "Interface\\AddOns\\Cell\\Media\\shield") local textures Builder.textureToName = {} diff --git a/Widgets/Bars/ShieldBar.lua b/Widgets/Bars/ShieldBar.lua index 202f282..873756b 100644 --- a/Widgets/Bars/ShieldBar.lua +++ b/Widgets/Bars/ShieldBar.lua @@ -204,7 +204,17 @@ function W:CreateShieldBar(button) function shieldBar:UpdateStyle() local colors = DB.GetColors().shieldBar - tex:SetTexture(colors.texture) + + if colors.texture == "Interface\\AddOns\\Cell\\Media\\shield" then + tex:SetTexture(colors.texture, "REPEAT", "REPEAT") + tex:SetHorizTile(true) + tex:SetVertTile(true) + else + tex:SetTexture(colors.texture) + tex:SetHorizTile(false) + tex:SetVertTile(false) + end + tex:SetVertexColor(unpack(colors.color)) overShieldGlow:SetVertexColor(unpack(colors.overShield)) end