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.

41 lines
1.0 KiB

4 years ago
local E, L, V, P, G = unpack(ElvUI)
5 years ago
local S = E:GetModule('Skins')
local _G = _G
local CreateFrame = CreateFrame
local hooksecurefunc = hooksecurefunc
local function SetupTimer(container, timer)
local bar = container:GetAvailableTimer(timer)
if not bar then return end
if not bar.atlasHolder then
bar.atlasHolder = CreateFrame('Frame', nil, bar)
bar.atlasHolder:SetClipsChildren(true)
bar.atlasHolder:SetInside()
bar.StatusBar:SetParent(bar.atlasHolder)
bar.StatusBar:ClearAllPoints()
bar.StatusBar:SetSize(204, 22)
bar.StatusBar:Point('TOP', 0, 2)
bar:SetSize(200, 18)
bar.Text:FontTemplate()
bar.Text:ClearAllPoints()
bar.Text:SetParent(bar.StatusBar)
bar.Text:Point('CENTER', bar.StatusBar, 0, 1)
5 years ago
end
bar:StripTextures()
bar:SetTemplate('Transparent')
5 years ago
end
function S:MirrorTimers() -- Mirror Timers (Underwater Breath, etc.)
5 years ago
if not (E.private.skins.blizzard.enable and E.private.skins.blizzard.mirrorTimers) then return end
hooksecurefunc(_G.MirrorTimerContainer, 'SetupTimer', SetupTimer)
5 years ago
end
S:AddCallback('MirrorTimers')