Planeshift

pawsloading.h

Go to the documentation of this file.
00001 /*
00002  * pawsLoadWindow.h - Author: Andrew Craig
00003  *
00004  * Copyright (C) 2003 Atomic Blue ([email protected], http://www.atomicblue.org)
00005  *
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation (version 2 of the License)
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00017  *
00018  */
00019  
00020 #ifndef PAWS_LOAD_WINDOW_HEADER
00021 #define PAWS_LOAD_WINDOW_HEADER
00022 //=============================================================================
00023 // Crystal Space Includes
00024 //=============================================================================
00025 
00026 //=============================================================================
00027 // Project Includes
00028 //=============================================================================
00029 #include "paws/pawswidget.h"
00030 #include "net/cmdbase.h"
00031 
00032 //=============================================================================
00033 // Local Includes
00034 //=============================================================================
00035 
00036 //-----------------------------------------------------------------------------
00037 // Forward Declarations
00038 //-----------------------------------------------------------------------------
00039 class pawsMessageTextBox;
00040 
00041 
00045 class pawsLoadWindow : public pawsWidget, public psClientNetSubscriber
00046 {
00047 public:
00048     pawsLoadWindow();
00049     virtual ~pawsLoadWindow();
00050     
00051     bool PostSetup();
00052     void HandleMessage( MsgEntry* me );
00053     void AddText( const char* text );
00054     void Clear();
00055     void Show();
00056     void Hide();
00057     void Draw();
00058     
00066     void InitAnim(csVector2 start, csVector2 dest, csTicks delay);
00067 
00073     void PublishMOTD();
00074 
00075 private:
00076     pawsMessageTextBox* loadingText;
00077     
00078     bool renderAnim;
00079     csVector2 lastPos;
00080     csVector2 vel;
00081     csVector2 diffVector;
00082     csVector2 destination;
00083     csArray<csVector2> positions;
00084     csTicks delayBetDot;
00085     csTicks startFrom;
00086     size_t numberDot;
00087     csRef<iPawsImage> dot;
00088 
00089     csString guildName; 
00090     csString guildMOTD; 
00091 
00092     // Default tip position (used for switch loading/travel screens)
00093     csRect tipDefaultRect;
00094 
00100     void DrawAnim();
00101 };
00102 
00103 CREATE_PAWS_FACTORY( pawsLoadWindow );
00104 
00105 #endif
00106 
00107