Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals

halloffame.cpp

Go to the documentation of this file.
00001 #include "borqueror.h"
00002 
00003 #include "halloffame.h"
00004 
00005 HallOfFame::HallOfFame( Window *aParent )
00006 : BqBase( eHallOfFame , aParent ) , res( Cfg::GetCfg().GetFilename() )
00007 {
00008 }
00009 
00010 HallOfFame::~HallOfFame( void )
00011 {
00012 }
00013 
00014 const bool HallOfFame::SetupWindow( const Message &aMsg )
00015 {
00016         icstring tmp, tmp1;
00017 
00018         BqBase::SetupWindow( aMsg );
00019         
00020         if( f )
00021         {
00022                 Cfg::Handler    &h = Cfg::GetCfg();
00023                 char    temp[20];
00024 
00025                 XListBox        *lb = dynamic_cast<XListBox *>( f->GetArsObject( 2 ) );
00026                 int     i = 0;
00027                 icstring        str;
00028                 while( !(str = h.GetCfgString( "HallOfFame" , itoa( i++ , temp , 10 ) ).c_str()).empty() && lb )
00029                 {
00030                         tmp = FindCrdOf( str , "score" );
00031                         tmp1 = FindCrdOf ( str , "date" );
00032                         char    buffer[1024];
00033                         sprintf( buffer , "%-30.30s\t%20.20s\t\t%s" , GetStr( str ).c_str() , 
00034                         Rsrc::GetId( tmp ).c_str() , 
00035                         Rsrc::GetStr( tmp1 ).c_str() );
00036                         lb->AddItem( buffer );
00037                 }
00038         }
00039         return true;
00040 }
00041 
00042 const bool HallOfFame::MainLoop( void )
00043 {
00044         SetupDialog( "HallOfFame" );
00045 
00046         return BqBase::MainLoop();
00047 }
00048 
00049 const bool HallOfFame::evMouseLClick( const CtrlMessage &msg )
00050 {
00051         BqBase::evMouseLClick( msg );
00052 
00053         if( isDisplayed )
00054                 if( ((Window *)msg.source)->GetId() == 1 )
00055                 {
00056                         isDisplayed= false;     
00057                         return !isDisplayed;
00058                 }
00059 
00060         return isDisplayed;
00061 }
00062 

Generated on Fri Dec 5 04:05:59 2003 for Borqueror by doxygen 1.3.3