You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.8 KiB

4 years ago
local E, L, V, P, G = unpack(ElvUI)
5 years ago
local S = E:GetModule('Skins')
local _G = _G
local hooksecurefunc = hooksecurefunc
5 years ago
local C_AzeriteEssence_CanOpenUI = C_AzeriteEssence.CanOpenUI
5 months ago
local function EssenceListScrollUpdateChild(button)
if not button.IsSkinned then
button:DisableDrawLayer('ARTWORK')
button:StyleButton()
local icon = button.Icon
if icon and not icon.backdrop then
S:HandleIcon(icon, true)
icon:ClearAllPoints()
icon:Point('TOPLEFT', button, 4, -4)
icon:Size(33)
end
if not button.backdrop then
button:CreateBackdrop('Transparent')
button.backdrop:SetInside(button, 1, 1)
if button.hover then
button.hover:SetInside(button.backdrop)
end
end
if button.PendingGlow then
button.PendingGlow:SetColorTexture(0.9, 0.8, 0.1, 0.3)
button.PendingGlow:SetInside(button.backdrop)
end
button.IsSkinned = true
end
end
local function EssenceListScrollUpdate(frame)
frame:ForEachFrame(EssenceListScrollUpdateChild)
end
5 years ago
function S:Blizzard_AzeriteEssenceUI()
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.azeriteEssence) then return end
if not C_AzeriteEssence_CanOpenUI() then return end
local AzeriteEssenceUI = _G.AzeriteEssenceUI
S:HandlePortraitFrame(AzeriteEssenceUI)
-- Reposition the Level Badge
AzeriteEssenceUI.PowerLevelBadgeFrame:ClearAllPoints()
AzeriteEssenceUI.PowerLevelBadgeFrame:Point('TOPLEFT')
AzeriteEssenceUI.PowerLevelBadgeFrame.Ring:Hide()
AzeriteEssenceUI.PowerLevelBadgeFrame.BackgroundBlack:Hide()
AzeriteEssenceUI.OrbBackground:SetAllPoints(AzeriteEssenceUI.ItemModelScene)
AzeriteEssenceUI.OrbRing:Size(483, 480)
S:HandleTrimScrollBar(AzeriteEssenceUI.EssenceList.ScrollBar)
5 years ago
-- Essence List on the right
5 months ago
hooksecurefunc(AzeriteEssenceUI.EssenceList.ScrollBox, 'Update', EssenceListScrollUpdate)
5 years ago
end
S:AddCallbackForAddon('Blizzard_AzeriteEssenceUI')