Skip to content

Commit

Permalink
Pushed SUI to 10.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
muleyo committed Mar 20, 2024
1 parent b4457fc commit 98c4984
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 12 deletions.
Binary file removed .DS_Store
Binary file not shown.
Binary file removed Libs/.DS_Store
Binary file not shown.
Binary file removed Modules/.DS_Store
Binary file not shown.
22 changes: 12 additions & 10 deletions Modules/UnitFrames/_Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,20 @@ function Module:OnEnable()
if db.texture ~= [[Interface\Default]] then
local function manaTexture(self)
if self and self.powerType then
-- Get Power Color
local powerColor = PowerBarColor[self.powerType]
if self.unit ~= 'player' then
-- Get Power Color
local powerColor = PowerBarColor[self.powerType]

-- Set Texture
self.texture:SetTexture(db.texture)
-- Set Texture
self.texture:SetTexture(db.texture)

-- Set Power Color
if self.unitFrame and self.unitFrame.manabar then
if self.powerType == 0 then
self.unitFrame.manabar:SetStatusBarColor(0, 0.5, 1)
else
self.unitFrame.manabar:SetStatusBarColor(powerColor.r, powerColor.g, powerColor.b)
-- Set Power Color
if self.unitFrame and self.unitFrame.manabar then
if self.powerType == 0 then
self.unitFrame.manabar:SetStatusBarColor(0, 0.5, 1)
else
self.unitFrame.manabar:SetStatusBarColor(powerColor.r, powerColor.g, powerColor.b)
end
end
end
end
Expand Down
18 changes: 18 additions & 0 deletions Modules/UnitFrames/_Player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,26 @@ function Module:OnEnable()
end
end

local function manaTexture(self)
if self and self.manabar then
-- Get Power Color
local powerColor = PowerBarColor[self.manabar.powerType]

-- Set Texture
self.manabar.texture:SetTexture(db.texture)

-- Set Power Color
if self.manabar.powerType == 0 then
self.manabar:SetStatusBarColor(0, 0.5, 1)
else
self.manabar:SetStatusBarColor(powerColor.r, powerColor.g, powerColor.b)
end
end
end

PlayerFrame:HookScript("OnEvent", function(self, event)
healthTexture(self, event)
manaTexture(self, event)

if not db.unitframes.cornericon then
PlayerFrame.PlayerFrameContent.PlayerFrameContentContextual.PlayerPortraitCornerIcon:Hide()
Expand Down
4 changes: 2 additions & 2 deletions SUI.toc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Interface: 100205
## Interface: 100206
## Author: Syiana & Muleyo
## Version: 10.2.15
## Version: 10.2.16
## Title: |cffea00ffS|r|cff00a2ffUI|r
## SavedVariables: SUIDB
## IconTexture: Interface\AddOns\SUI\Media\Icons\SUI
Expand Down

0 comments on commit 98c4984

Please sign in to comment.