home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming All in One / 3D Game Programming All in One Disc.iso / 3D2E / demo / client / scripts / loadingGui.cs < prev    next >
Encoding:
Text File  |  2005-11-23  |  1.3 KB  |  48 lines

  1. //-----------------------------------------------------------------------------
  2. // Torque Game Engine 
  3. // Copyright (C) GarageGames.com, Inc.
  4. //-----------------------------------------------------------------------------
  5.  
  6. //------------------------------------------------------------------------------
  7. function LoadingGui::onAdd(%this)
  8. {
  9.    %this.qLineCount = 0;
  10. }
  11.  
  12. //------------------------------------------------------------------------------
  13. function LoadingGui::onWake(%this)
  14. {
  15.    // Play sound...
  16.    CloseMessagePopup();
  17.    
  18.    // Push the menu system
  19.    Canvas.pushdialog(OverlayDlg);
  20.    
  21.    // Initialize overlay buttons
  22.    OverlayQuitPage.setVisible(false);
  23.    OverlayNextPage.setVisible(false);
  24.    OverlayPrevPage.setVisible(true);
  25.    OverlayPrevPage.command = "disconnect();";
  26.  
  27.    //
  28.    LoadingProgressTxt.setValue("WAITING FOR SERVER");
  29. }
  30.  
  31. //------------------------------------------------------------------------------
  32. function LoadingGui::onSleep(%this)
  33. {
  34.    // Clear the load info:
  35.    if ( %this.qLineCount !$= "" )
  36.    {
  37.       for ( %line = 0; %line < %this.qLineCount; %line++ )
  38.          %this.qLine[%line] = "";
  39.    }      
  40.    %this.qLineCount = 0;
  41.  
  42.    LOAD_MapName.setText( "" );
  43.    LOAD_MapDescription.setText( "" );
  44.    LoadingProgress.setValue( 0 );
  45.  
  46.    // Stop sound...
  47. }
  48.