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 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:SetScript('OnMouseDown', UF.AuraBars_OnClick)
statusBar:CreateSoftShadow()
statusBar:SetScript('OnMouseDown', OnClick)
statusBar:SetPoint("LEFT")
statusBar:SetPoint("RIGHT")
statusBar.icon:CreateBackdrop(nil, nil, nil, UF.thinBorders, true)
statusBar.icon.backdrop:CreateSoftShadow()
UF.statusbars[statusBar] = true
UF:Update_StatusBar(statusBar)
......@@ -26,8 +29,17 @@ function UF:Construct_AuraBars(statusBar)
local frame = statusBar:GetParent()
statusBar.db = frame.db and frame.db.aurabar
end
function BU:Configure_AuraBars(frame)
if not BUI.ShadowMode then return end
statusBar:CreateSoftShadow()
statusBar.icon.backdrop:CreateSoftShadow()
end
if not frame.VARIABLES_SET then return 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)
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()
for _, unitName in pairs(UF.units) do
local frameNameUnit = E:StringTitle(unitName)
......
......@@ -35,6 +35,9 @@ function BU:ArrangeFocus(frame, db)
-- Portrait
BU:Configure_Portrait(frame)
-- AuraBars shadows
BU:Configure_AuraBars(frame)
frame:UpdateAllElements("BenikUI_UpdateAllElements")
end
......
......@@ -60,6 +60,9 @@ function BU:ArrangePlayer(frame, db)
-- Rest Icon
BU:Configure_RestingIndicator(frame)
-- AuraBars shadows
BU:Configure_AuraBars(frame)
-- ClassBar shadows
BU:Configure_ClassBar(frame)
......
......@@ -151,6 +151,9 @@ function BU:ArrangeTarget(frame, db)
-- Portrait
BU:Configure_Portrait(frame, false)
-- AuraBars shadows
BU:Configure_AuraBars(frame)
frame:UpdateAllElements("BenikUI_UpdateAllElements")
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