//-----------------------------------------------------------------------------
// StartupGui is the splash screen that initially shows when the game is loaded
//-----------------------------------------------------------------------------
function loadStartup()
{
//called from init.cs
Canvas.pushDialog(Custom_StartupGui_Background);//load the background
schedule(1000, 0, "Load_Startup_Back_Done");//schedule the game screen
}
function Load_Startup_Back_Done()
{
Canvas.pushDialog(Custom_StartupGui_Game);//display the Game screen
schedule(3000, 0, "Load_Startup_Game_Done");//schedule the Developer/company screen
}
function Load_Startup_Game_Done()
{
Canvas.popDialog(Custom_StartupGui_Game);//unload the Game screen
Canvas.pushDialog(Custom_StartupGui_Developer);//display the Developer/Company screen
schedule(2000, 0, "Load_Startup_Developer_Done");//schedule the Torque screen
}
function Load_Startup_Developer_Done()
{
Canvas.popDialog(Custom_StartupGui_Developer);//unload the Developer/Company screen
Canvas.pushDialog(Custom_StartupGui_Torque);//display the Torque logo
schedule(5500, 0, "StartupGui_onDone");//schedule the end of startup and display the main menu
//if you're using the stock fade gui element +1500 on 4 seconds for last screen to fade out
//it takes a little longer for this one or Main Menu kicks in a bit fast
//and the result it visually jarring - just a word of warning ...
}
function StartupGui_onDone(%this)
{
Canvas.popDialog(Custom_StartupGui_Torque);//unload the Torque logo
Canvas.popDialog(Custom_StartupGui_Background);//unload the background
loadMainMenu();//load the main menu and lets play games!
}