Commit 6fa556cc authored by Benik's avatar Benik

Revert "AuraBars / Portrait"

This reverts commit 6a632996.
parent 1ea7123c
local BUI, E, L, V, P, G = unpack(select(2, ...)) local BUI, E, L, V, P, G = unpack(select(2, ...))
local UF = E:GetModule('UnitFrames'); local UF = E:GetModule('UnitFrames');
local BU = BUI:GetModule('Units');
function UF:Construct_AuraBars(statusBar) function BU:Create_AuraBarsWithShadow(statusBar)
statusBar:CreateBackdrop(nil, nil, nil, UF.thinBorders, true) statusBar:CreateBackdrop(nil, nil, nil, UF.thinBorders, true)
statusBar:SetScript('OnMouseDown', UF.AuraBars_OnClick) statusBar:CreateSoftShadow()
statusBar:SetScript('OnMouseDown', OnClick)
statusBar:SetPoint("LEFT") statusBar:SetPoint("LEFT")
statusBar:SetPoint("RIGHT") statusBar:SetPoint("RIGHT")
statusBar.icon:CreateBackdrop(nil, nil, nil, UF.thinBorders, true) statusBar.icon:CreateBackdrop(nil, nil, nil, UF.thinBorders, true)
statusBar.icon.backdrop:CreateSoftShadow()
UF.statusbars[statusBar] = true UF.statusbars[statusBar] = true
UF:Update_StatusBar(statusBar) UF:Update_StatusBar(statusBar)
...@@ -26,8 +29,17 @@ function UF:Construct_AuraBars(statusBar) ...@@ -26,8 +29,17 @@ function UF:Construct_AuraBars(statusBar)
local frame = statusBar:GetParent() local frame = statusBar:GetParent()
statusBar.db = frame.db and frame.db.aurabar statusBar.db = frame.db and frame.db.aurabar
end
function BU:Configure_AuraBars(frame)
if not BUI.ShadowMode then return end if not BUI.ShadowMode then return end
statusBar:CreateSoftShadow()
statusBar.icon.backdrop:CreateSoftShadow() if not frame.VARIABLES_SET then return end
end local auraBars = frame.AuraBars
local db = frame.db
auraBars.db = db.aurabar
if db.aurabar.enable then
auraBars.PostCreateBar = BU.Create_AuraBarsWithShadow
end
end
\ No newline at end of file
...@@ -149,6 +149,25 @@ function BU:Configure_Portrait(frame, isPlayer) ...@@ -149,6 +149,25 @@ function BU:Configure_Portrait(frame, isPlayer)
end end
end end
-- Portrait Alpha setting. Idea: Vxt, Credit: Blazeflack
local function OnConfigure_Portrait(self, frame)
local db = frame.db
if not db then return end
if BUI.SLE then return end
if frame.USE_PORTRAIT then
local portrait = frame.Portrait
if frame.USE_PORTRAIT_OVERLAY and not db.portrait.fullOverlay then
portrait:SetAlpha(E.db.benikui.unitframes.misc.portraitTransparency)
else
portrait:SetAlpha(0.35)
end
end
end
hooksecurefunc(UF, "Configure_Portrait", OnConfigure_Portrait)
hooksecurefunc(UF, "PortraitUpdate", OnConfigure_Portrait)
local function ResetPostUpdate() local function ResetPostUpdate()
for _, unitName in pairs(UF.units) do for _, unitName in pairs(UF.units) do
local frameNameUnit = E:StringTitle(unitName) local frameNameUnit = E:StringTitle(unitName)
......
...@@ -35,6 +35,9 @@ function BU:ArrangeFocus(frame, db) ...@@ -35,6 +35,9 @@ function BU:ArrangeFocus(frame, db)
-- Portrait -- Portrait
BU:Configure_Portrait(frame) BU:Configure_Portrait(frame)
-- AuraBars shadows
BU:Configure_AuraBars(frame)
frame:UpdateAllElements("BenikUI_UpdateAllElements") frame:UpdateAllElements("BenikUI_UpdateAllElements")
end end
......
...@@ -60,6 +60,9 @@ function BU:ArrangePlayer(frame, db) ...@@ -60,6 +60,9 @@ function BU:ArrangePlayer(frame, db)
-- Rest Icon -- Rest Icon
BU:Configure_RestingIndicator(frame) BU:Configure_RestingIndicator(frame)
-- AuraBars shadows
BU:Configure_AuraBars(frame)
-- ClassBar shadows -- ClassBar shadows
BU:Configure_ClassBar(frame) BU:Configure_ClassBar(frame)
......
...@@ -151,6 +151,9 @@ function BU:ArrangeTarget(frame, db) ...@@ -151,6 +151,9 @@ function BU:ArrangeTarget(frame, db)
-- Portrait -- Portrait
BU:Configure_Portrait(frame, false) BU:Configure_Portrait(frame, false)
-- AuraBars shadows
BU:Configure_AuraBars(frame)
frame:UpdateAllElements("BenikUI_UpdateAllElements") frame:UpdateAllElements("BenikUI_UpdateAllElements")
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment