tge/example/demo/client/scripts/loadingGui.cs
2017-04-17 06:17:10 -06:00

47 lines
1.3 KiB
C#
Executable File

//-----------------------------------------------------------------------------
// Torque Game Engine
// Copyright (C) GarageGames.com, Inc.
//-----------------------------------------------------------------------------
//------------------------------------------------------------------------------
function LoadingGui::onAdd(%this)
{
%this.qLineCount = 0;
}
//------------------------------------------------------------------------------
function LoadingGui::onWake(%this)
{
// Play sound...
CloseMessagePopup();
// Push the menu system
Canvas.pushdialog(OverlayDlg);
// Initialize overlay buttons
OverlayNextPage.setVisible(false);
OverlayPrevPage.setVisible(true);
OverlayPrevPage.command = "disconnect();";
//
LoadingProgressTxt.setValue("WAITING FOR SERVER");
}
//------------------------------------------------------------------------------
function LoadingGui::onSleep(%this)
{
// Clear the load info:
if ( %this.qLineCount !$= "" )
{
for ( %line = 0; %line < %this.qLineCount; %line++ )
%this.qLine[%line] = "";
}
%this.qLineCount = 0;
LOAD_MapName.setText( "" );
LOAD_MapDescription.setText( "" );
LoadingProgress.setValue( 0 );
// Stop sound...
}