Originally Posted by VincentSDSH
UIFrameFadeIn()/Out() maybe? I use that in place of :Show()/:Hide() and it seems to work nicely.
Lua Code:
UIFrameFadeIn(frame, timeToFade, startAlpha, endAlpha) UIFrameFadeOut(frame, timeToFade, startAlpha, endAlpha)
|
Hm, perhaps. Is there a way in Lua perhaps? I'm uncomfortable with XML. Trying to stay simple.
Lua Code:
local addonName, addonData = ...
local InstallerLogo = CreateFrame("Frame", addonName.."ILogo", UIParent);
InstallerLogo:RegisterEvent("PLAYER_ENTERING_WORLD");
InstallerLogo:SetScript("OnEvent", function(self,event,...)
self:SetSize(850, 480); -- the size of the splash
self:SetPoint("CENTER"); -- its position on the screen
if type(CharacterVar) ~= "number" then
CharacterVar = 1
InstallerLogo.texture = InstallerLogo:CreateTexture(nil, "HIGH");
InstallerLogo.texture:SetTexture("Interface\\Addons\\PawsUI\\Art\\Splash.tga");
InstallerLogo.texture:SetAllPoints();
InstallerLogo:SetAlpha(0)
InstallerLogo:SetMovable(true)
InstallerLogo:EnableMouse(true)
InstallerLogo:RegisterForDrag("LeftButton")
InstallerLogo:SetScript("OnDragStart", InstallerLogo.StartMoving)
InstallerLogo:SetScript("OnDragStop", InstallerLogo.StopMovingOrSizing)
else
if CharacterVar == 1 then
-- Do something post install. --
else
-- Do something post install. --
end
CharacterVar = CharacterVar + 1
if CharacterVar == 100 then
ChatFrame1:AddMessage('HOLY CRAP'.. UnitName("Player").."! You have used PawsUI *100* times before. THANK YOU! <3")
else
-- Do nothing. --
end
end
end)
Ok, so this is what I have so far in the goal to fade in/out the splash minus that part. This part is trying to set a per character variable to 1. On 1 or below, the splash shows, 2 or higher - it doesn't. I don't want the splash / install to pop up on every loading screen / reloadui.