Back to index

supertuxkart  0.5+dfsg1
Public Member Functions | Protected Attributes
RaceMenu Class Reference

#include <race_menu.hpp>

Inheritance diagram for RaceMenu:
Inheritance graph
[legend]
Collaboration diagram for RaceMenu:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 RaceMenu ()
 ~RaceMenu ()
void select ()
void handle (GameAction ga, int value)
virtual void update (float dt)
virtual void inputKeyboard (SDLKey, int)
virtual void countdown ()
void inputPointer (int x, int y)
void lockInput ()
void unlockInput ()
void TimeToString (const double time, char *s)

Protected Attributes

bool m_locked
int m_menu_id

Detailed Description

Definition at line 25 of file race_menu.hpp.


Constructor & Destructor Documentation

Definition at line 43 of file race_menu.cpp.

Here is the call graph for this function:

Definition at line 67 of file race_menu.cpp.

Here is the call graph for this function:


Member Function Documentation

void BaseGUI::countdown ( ) [virtual, inherited]

Reimplemented in DisplayResConfirm.

Definition at line 147 of file base_gui.cpp.

{
}
void RaceMenu::handle ( GameAction  ga,
int  value 
) [virtual]

Reimplemented from BaseGUI.

Definition at line 117 of file race_menu.cpp.

{
    switch ( ga )
    {
    case GA_LEAVE:
        if (value)
            break;
              
        world->unpause();
        menu_manager->popMenu();
        break;

    default:
        BaseGUI::handle(ga, value);
        break;
    }
}

Here is the call graph for this function:

void BaseGUI::inputKeyboard ( SDLKey  ,
int   
) [virtual, inherited]

Reimplemented in PlayerControls.

Definition at line 139 of file base_gui.cpp.

{
       // This method is not supposed to be called since BaseGUI does not
       // handle low-level keyboard input.
       assert(false);
}

Here is the caller graph for this function:

void BaseGUI::inputPointer ( int  x,
int  y 
) [inherited]

Definition at line 102 of file base_gui.cpp.

{
    if( m_locked ) return;

    const int PREV_SELECTED_WGT = widget_manager->getSelectedWgt();
    const int SELECTED_WGT = widget_manager->handlePointer( x, y );

    if( SELECTED_WGT != WidgetManager::WGT_NONE )
    {
        if( PREV_SELECTED_WGT != WidgetManager::WGT_NONE )
        {
            widget_manager->darkenWgtColor( PREV_SELECTED_WGT );
        }

        widget_manager->lightenWgtColor( SELECTED_WGT );
        widget_manager->pulseWgt( SELECTED_WGT );
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void BaseGUI::lockInput ( ) [inline, inherited]

Definition at line 49 of file base_gui.hpp.

{ m_locked = true; }
void RaceMenu::select ( ) [virtual]

Implements BaseGUI.

Definition at line 74 of file race_menu.cpp.

{
    int clicked_token = widget_manager->getSelectedWgt();

    switch (clicked_token)
    {
    case WTOK_RETURN_RACE:
        world->unpause();
        menu_manager->popMenu();
        if(user_config->m_fullscreen) SDL_ShowCursor(SDL_DISABLE);
        break;

    case WTOK_SETUP_NEW_RACE:
        world->unpause();
        race_manager->exit_race();
        menu_manager->pushMenu(MENUID_CHARSEL_P1);
        break;

    case WTOK_RESTART_RACE:
        menu_manager->popMenu();
        if(user_config->m_fullscreen) SDL_ShowCursor(SDL_DISABLE);
        world->restartRace();
        break;

    case WTOK_OPTIONS:
        menu_manager->pushMenu(MENUID_OPTIONS);
        break;

    case WTOK_HELP:
        menu_manager->pushMenu(MENUID_HELP1);
        break;

    case WTOK_QUIT:
        world->unpause();
        race_manager->exit_race();
        break;

    default:
        break;
    }
}

Here is the call graph for this function:

void BaseGUI::TimeToString ( const double  time,
char *  s 
) [inherited]

Definition at line 130 of file base_gui.cpp.

{
    int min     = (int) floor ( TIME / 60.0 ) ;
    int sec     = (int) floor ( TIME - (double) ( 60 * min ) ) ;
    int tenths  = (int) floor ( 10.0f * (TIME - (double)(sec + 60* min)));
    sprintf ( s, "%d:%02d:%d", min,  sec,  tenths ) ;
}   // TimeToString

Here is the caller graph for this function:

void BaseGUI::unlockInput ( ) [inline, inherited]

Definition at line 50 of file base_gui.hpp.

{ m_locked = false; }
void BaseGUI::update ( float  dt) [virtual, inherited]

Reimplemented in RaceGUI, CharSel, HelpPageOne, GrandPrixEnd, LeaderResult, GrandPrixSelect, ChallengesMenu, StartRaceFeedback, and TrackSel.

Definition at line 123 of file base_gui.cpp.

{
    widget_manager->update(dt);
}   // update

Here is the call graph for this function:


Member Data Documentation

bool BaseGUI::m_locked [protected, inherited]

Definition at line 55 of file base_gui.hpp.

int BaseGUI::m_menu_id [protected, inherited]

Definition at line 56 of file base_gui.hpp.


The documentation for this class was generated from the following files: