Last active
July 25, 2018 16:56
-
-
Save StinkyTwitch/3d8ec446586d3074feff to your computer and use it in GitHub Desktop.
Splash Logo Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--[[-------------------------------------------------------------------------------------------- | |
-- 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