Skip to content

Commit

Permalink
Shadow to __shadow
Browse files Browse the repository at this point in the history
  • Loading branch information
siweia committed Jul 31, 2020
1 parent e655648 commit 333156b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
16 changes: 8 additions & 8 deletions Interface/AddOns/NDui/Core/Functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -475,18 +475,18 @@ do
-- Backdrop shadow
function B:CreateSD(size, override)
if not override and not NDuiDB["Skins"]["Shadow"] then return end
if self.Shadow then return end
if self.__shadow then return end

local frame = self
if self:GetObjectType() == "Texture" then frame = self:GetParent() end

self.Shadow = CreateFrame("Frame", nil, frame, "BackdropTemplate")
self.Shadow:SetOutside(self, size or 4, size or 4)
self.Shadow:SetBackdrop({edgeFile = DB.glowTex, edgeSize = B:Scale(size or 5)})
self.Shadow:SetBackdropBorderColor(0, 0, 0, size and 1 or .4)
self.Shadow:SetFrameLevel(1)
self.__shadow = CreateFrame("Frame", nil, frame, "BackdropTemplate")
self.__shadow:SetOutside(self, size or 4, size or 4)
self.__shadow:SetBackdrop({edgeFile = DB.glowTex, edgeSize = B:Scale(size or 5)})
self.__shadow:SetBackdropBorderColor(0, 0, 0, size and 1 or .4)
self.__shadow:SetFrameLevel(1)

return self.Shadow
return self.__shadow
end
end

Expand Down Expand Up @@ -713,7 +713,7 @@ do
end

local bg = B.SetBD(self)
self.Shadow = bg.Shadow
self.__shadow = bg.__shadow

if spark then
self.Spark = self:CreateTexture(nil, "OVERLAY")
Expand Down
4 changes: 2 additions & 2 deletions Interface/AddOns/NDui/Libs/oUF/Plugins/RaidDebuffs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ local function UpdateDebuffFrame(self, name, icon, count, debuffType, duration,
end

local c = DispellColor[debuffType] or DispellColor.none
if rd.ShowDebuffBorder and rd.Shadow then
rd.Shadow:SetBackdropBorderColor(c[1], c[2], c[3])
if rd.ShowDebuffBorder and rd.__shadow then
rd.__shadow:SetBackdropBorderColor(c[1], c[2], c[3])
end

if rd.glowFrame then
Expand Down
4 changes: 2 additions & 2 deletions Interface/AddOns/NDui/Modules/Skins/AddOns/WeakAuras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ local function ReskinWA()
f.bg.__icon = f.icon
f.bg:HookScript("OnUpdate", function(self)
self:SetAlpha(self.__icon:GetAlpha())
if self.Shadow then
self.Shadow:SetAlpha(self.__icon:GetAlpha())
if self.__shadow then
self.__shadow:SetAlpha(self.__icon:GetAlpha())
end
end)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ tinsert(C.defaultThemes, function()
end
if frame.bg then
frame.bg:SetBackdropColor(0, 0, 0, NDuiDB["Skins"]["SkinAlpha"])
if frame.bg.Shadow then
frame.bg.Shadow:SetBackdropBorderColor(0, 0, 0, .4)
if frame.bg.__shadow then
frame.bg.__shadow:SetBackdropBorderColor(0, 0, 0, .4)
end
end
end
Expand All @@ -21,8 +21,8 @@ tinsert(C.defaultThemes, function()
frame = frame:GetParent():GetParent()
if frame.bg then
frame.bg:SetBackdropColor(0, 0, 0, NDuiDB["Skins"]["SkinAlpha"])
if frame.bg.Shadow then
frame.bg.Shadow:SetBackdropBorderColor(0, 0, 0, .4)
if frame.bg.__shadow then
frame.bg.__shadow:SetBackdropBorderColor(0, 0, 0, .4)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion Interface/AddOns/NDui/Modules/UFs/Functions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function UF:CreateHealthBar(self)
health:SetStatusBarColor(.1, .1, .1)
health:SetFrameLevel(self:GetFrameLevel() - 2)
health.backdrop = B.SetBD(health, 0) -- don't mess up with libs
health.shadow = health.backdrop.Shadow
health.shadow = health.backdrop.__shadow
B:SmoothBar(health)

local bg = health:CreateTexture(nil, "BACKGROUND")
Expand Down
6 changes: 3 additions & 3 deletions Interface/AddOns/NDui/Modules/UFs/Raid.lua
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function UF:CreateTargetBorder(self)
border:SetOutside(self.Health.backdrop, C.mult+3, C.mult+3, self.Power.backdrop)
border:SetBackdropBorderColor(1, 1, 1)
border:Hide()
self.Shadow = nil
self.__shadow = nil

self.TargetBorder = border
self:RegisterEvent("PLAYER_TARGET_CHANGED", UF.UpdateTargetBorder, true)
Expand All @@ -77,7 +77,7 @@ function UF:CreateThreatBorder(self)
threatIndicator:SetOutside(self.Health.backdrop, C.mult+3, C.mult+3, self.Power.backdrop)
threatIndicator:SetBackdropBorderColor(.7, .7, .7)
threatIndicator:SetFrameLevel(0)
self.Shadow = nil
self.__shadow = nil

self.ThreatIndicator = threatIndicator
self.ThreatIndicator.Override = UF.UpdateThreatBorder
Expand Down Expand Up @@ -121,7 +121,7 @@ function UF:CreateRaidDebuffs(self)
bu:SetPoint("RIGHT", -15, 0)
bu:SetFrameLevel(self:GetFrameLevel() + 3)
B.CreateSD(bu, 3, true)
bu.Shadow:SetFrameLevel(self:GetFrameLevel() + 2)
bu.__shadow:SetFrameLevel(self:GetFrameLevel() + 2)
bu:SetScale(scale)
bu:Hide()

Expand Down

0 comments on commit 333156b

Please sign in to comment.