Back to index

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

#include <help_page_three.hpp>

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

List of all members.

Public Member Functions

 HelpPageThree ()
 ~HelpPageThree ()
void select ()
virtual void update (float dt)
virtual void handle (GameAction, int)
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 26 of file help_page_three.hpp.


Constructor & Destructor Documentation

Definition at line 44 of file help_page_three.cpp.

{
    widget_manager->switchOrder();
    widget_manager->addTitleWgt( WTOK_TITLE, 100, 8, _("Game modes"));

    widget_manager->addEmptyWgt( WidgetManager::WGT_NONE, 100, 2 );

    if(!unlock_manager->isLocked("grandprix"))
    {
        widget_manager->addTextWgt( WTOK_TXT1, 100, 15,
            _("Grand Prix: Win victory points \n\
by racing through a group of tracks,  \n\
most points wins (shortest time in case of a tie!)          "));
        widget_manager->setWgtTextSize( WTOK_TXT1, WGT_FNT_SML );
        widget_manager->addEmptyWgt( WidgetManager::WGT_NONE, 100, 1 );
    }

    widget_manager->addTextWgt( WTOK_TXT2, 100, 15,
        _("Quick race: Pick a single track, shortest time wins.         "));
        widget_manager->setWgtTextSize( WTOK_TXT2, WGT_FNT_SML );
    widget_manager->addEmptyWgt( WidgetManager::WGT_NONE, 100, 1 );

    widget_manager->addTextWgt( WTOK_TXT3, 100, 15,
        _("Time Trial: As quick race, but no items.                       "));
        widget_manager->setWgtTextSize( WTOK_TXT3, WGT_FNT_SML );
    widget_manager->addEmptyWgt( WidgetManager::WGT_NONE, 100, 1 );

    if(!unlock_manager->isLocked("followleader"))
    {
        widget_manager->addTextWgt( WTOK_TXT4, 100, 15,
            _("Follow the leader: Stay behind the leader kart.                 \n\
When the countdown reaches zero, a kart ahead\n\
of the leader or the last kart is eliminated."));
        widget_manager->setWgtTextSize( WTOK_TXT4, WGT_FNT_SML );
        widget_manager->addEmptyWgt( WidgetManager::WGT_NONE, 100, 13 );
    }

    /*Buttons at the bottom*/
    widget_manager->addTextButtonWgt( WTOK_SECOND_PAGE, 25, 7,
        _("Previous help screen"));
    widget_manager->setWgtTextSize( WTOK_SECOND_PAGE, WGT_FNT_SML );

    widget_manager->addTextButtonWgt( WTOK_QUIT, 40, 7,
        _("Go back to the menu"));
    widget_manager->setWgtTextSize( WTOK_QUIT, WGT_FNT_SML );

    widget_manager->layout( WGT_AREA_TOP );
}   // HelpMenu

Here is the call graph for this function:

Definition at line 94 of file help_page_three.cpp.

{
    widget_manager->reset();
}   // ~HelpMenu

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 BaseGUI::handle ( GameAction  action,
int  value 
) [virtual, inherited]

Reimplemented in RaceGUI, LeaderResult, PlayerControls, RaceResultsGUI, DisplayResConfirm, MainMenu, Options, and RaceMenu.

Definition at line 43 of file base_gui.cpp.

{
    if( m_locked ) return;

    // Skip on keypress, act on keyrelease only.
    if (value) return;

       int previous = widget_manager->getSelectedWgt();

    switch ( action )
    {
    case GA_CURSOR_LEFT:
              animateWidget(previous,
                                     widget_manager->handleLeft());

              break;
    case GA_CURSOR_RIGHT:
              animateWidget(previous,
                                     widget_manager->handleRight());
              break;
    case GA_CURSOR_UP:
              animateWidget(previous,
                                     widget_manager->handleUp());
              break;
    case GA_CURSOR_DOWN:
              animateWidget(previous,
                                     widget_manager->handleDown());
              break;
       case GA_INC_SCROLL_SPEED:
              widget_manager->increaseScrollSpeed();
              break;
       case GA_INC_SCROLL_SPEED_FAST:
              widget_manager->increaseScrollSpeed(true);
              break;
       case GA_DEC_SCROLL_SPEED:
              widget_manager->decreaseScrollSpeed();
              break;
       case GA_DEC_SCROLL_SPEED_FAST:
              widget_manager->decreaseScrollSpeed(true);
              break;
    case GA_ENTER:
        select();
        break;
    case GA_LEAVE:
        if (menu_manager->getMenuStackSize() > 1)
        {
           if(menu_manager->isCurrentMenu(MENUID_RACEMENU))
             world->unpause();

           menu_manager->popMenu();
        }
        break;

    default:
        break;
    }   // switch
}   // handle

Here is the call graph for this function:

Here is the caller 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 HelpPageThree::select ( ) [virtual]

Implements BaseGUI.

Definition at line 100 of file help_page_three.cpp.

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: