Skip to content

Instantly share code, notes, and snippets.

@StinkyTwitch
Last active July 25, 2018 16:56
Show Gist options
  • Save StinkyTwitch/3d8ec446586d3074feff to your computer and use it in GitHub Desktop.
Save StinkyTwitch/3d8ec446586d3074feff to your computer and use it in GitHub Desktop.
Splash Logo Code
--[[--------------------------------------------------------------------------------------------
-- SPLASH LOGO
--------------------------------------------------------------------------------------------]]--
local function onUpdate(RotAgentSplash,elapsed)
if RotAgentSplash.time < GetTime() - 15.0 then
if RotAgentSplash:GetAlpha() then
RotAgentSplash:Hide()
else
RotAgentSplash:SetAlpha(RotAgentSplash:GetAlpha() - .05)
end
end
end
local function RotAgentSplashFrame()
if conf('splash', true) then
RotAgentSplash:SetAlpha(1)
RotAgentSplash.time = GetTime()
RotAgentSplash:Show()
end
end
local function RotAgentSplashInitialize()
if not RotAgentSplash then
RotAgentSplash = CreateFrame("Frame", nil,UIParent)
RotAgentSplash:SetPoint("CENTER",UIParent)
RotAgentSplash:SetWidth(512)
RotAgentSplash:SetHeight(512)
RotAgentSplash:SetBackdrop({ bgFile = "Interface\\AddOns\\RotAgent\\Library\\Media\\splash.tga" })
RotAgentSplash:SetScript("onUpdate",onUpdate)
RotAgentSplash:Hide()
RotAgentSplash.time = 0
RotAgentSplashFrame()
end
end
RotAgentSplashInitialize()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment