Commit 6a632996 authored by Azilroka's avatar Azilroka

AuraBars / Portrait

parent 53608640
local BUI, E, L, V, P, G = unpack(select(2, ...))
local UF = E:GetModule('UnitFrames');
local BU = BUI:GetModule('Units');
function BU:Create_AuraBarsWithShadow(statusBar)
function UF:Construct_AuraBars(statusBar)
statusBar:CreateBackdrop(nil, nil, nil, UF.thinBorders, true)
statusBar:CreateSoftShadow()
statusBar:SetScript('OnMouseDown', OnClick)
statusBar:SetScript('OnMouseDown', UF.AuraBars_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)
......@@ -29,17 +26,8 @@ function BU:Create_AuraBarsWithShadow(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
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
statusBar:CreateSoftShadow()
statusBar.icon.backdrop:CreateSoftShadow()
end
......@@ -149,25 +149,6 @@ 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,9 +35,6 @@ function BU:ArrangeFocus(frame, db)
-- Portrait
BU:Configure_Portrait(frame)
-- AuraBars shadows
BU:Configure_AuraBars(frame)
frame:UpdateAllElements("BenikUI_UpdateAllElements")
end
......
......@@ -60,9 +60,6 @@ function BU:ArrangePlayer(frame, db)
-- Rest Icon
BU:Configure_RestingIndicator(frame)
-- AuraBars shadows
BU:Configure_AuraBars(frame)
-- ClassBar shadows
BU:Configure_ClassBar(frame)
......
......@@ -151,9 +151,6 @@ 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