Skip to content

Commit

Permalink
[Feature] Add Cell Shield texture
Browse files Browse the repository at this point in the history
  • Loading branch information
Krealle committed Sep 17, 2024
1 parent 1e0b6b4 commit b22b318
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions Menu/Builder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}

Expand Down
12 changes: 11 additions & 1 deletion Widgets/Bars/ShieldBar.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b22b318

Please sign in to comment.