gBrowserMenuItem Class Reference

Inheritance diagram for gBrowserMenuItem:

Inheritance graph
[legend]
Collaboration diagram for gBrowserMenuItem:

Collaboration graph
[legend]

List of all members.

Protected Member Functions

 gBrowserMenuItem (uMenu *M, const tOutput &help)
virtual bool Event (SDL_Event &event)
virtual void RenderBackground ()


Detailed Description

Definition at line 128 of file gServerBrowser.cpp.


Constructor & Destructor Documentation

gBrowserMenuItem::gBrowserMenuItem ( uMenu M,
const tOutput help 
) [inline, protected]

Definition at line 131 of file gServerBrowser.cpp.

00131                                                   : uMenuItem( M, help )
00132     {
00133     }


Member Function Documentation

bool gBrowserMenuItem::Event ( SDL_Event &  event  )  [protected, virtual]

< the time of the last manual refresh

Reimplemented from uMenuItem.

Reimplemented in gServerMenuItem.

Definition at line 672 of file gServerBrowser.cpp.

References uMenuItem::Event(), Refresh(), st_ToDo(), and tSysTimeFloat().

Referenced by gServerMenuItem::Event().

00673 {
00674 #ifndef DEDICATED
00675     switch (event.type)
00676     {
00677     case SDL_KEYDOWN:
00678         switch (event.key.keysym.sym)
00679         {
00680         case SDLK_r:
00681             {
00682                 static double lastRefresh = - 100; 
00683                 if ( tSysTimeFloat() - lastRefresh > 2.0 )
00684                 {
00685                     lastRefresh = tSysTimeFloat();
00686                     // trigger refresh
00687                     st_ToDo( Refresh );
00688                     return true;
00689                 }
00690             }
00691             break;
00692         default:
00693             break;
00694         }
00695     }
00696 #endif
00697 
00698     return uMenuItem::Event( event );
00699 }

Here is the call graph for this function:

Here is the caller graph for this function:

void gBrowserMenuItem::RenderBackground (  )  [protected, virtual]

Reimplemented from uMenuItem.

Reimplemented in gServerMenuItem.

Definition at line 763 of file gServerBrowser.cpp.

References continuePoll, nServerInfo::DoQueryAll(), uMenu::GenericBackground(), getFriendsEnabled(), uMenuItem::menu, uMenuItem::Render(), rTextField::SetDefaultColor(), sg_simultaneous, sn_Receive(), and sn_SendPlanned().

Referenced by gServerMenuItem::RenderBackground().

00764 {
00765     sn_Receive();
00766     sn_SendPlanned();
00767 
00768     menu->GenericBackground();
00769     if (continuePoll)
00770     {
00771         continuePoll = nServerInfo::DoQueryAll(sg_simultaneous);
00772         sn_Receive();
00773         sn_SendPlanned();
00774     }
00775 
00776 #ifndef DEDICATED
00777     rTextField::SetDefaultColor( tColor(.8,.3,.3,1) );
00778 
00779     tString sn2 = tString(tOutput("$network_master_servername"));
00780     if (getFriendsEnabled()) //display that friends filter is on
00781         sn2 << " - " << tOutput("$friends_enable");
00782 
00783     static_cast<gServerMenu*>(menu)->Render(.62,
00784                                             sn2,
00785                                             tOutput("$network_master_score"),
00786                                             tOutput("$network_master_users"),
00787                                             tOutput("$network_master_ping"));
00788 #endif
00789 }

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
Generated on Sat Mar 15 23:34:24 2008 for Armagetron Advanced by  doxygen 1.5.4