Added game mode help screen.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/trunk/supertuxkart@1847 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
cosmosninja 2008-05-10 21:00:58 +00:00
parent f1fe915ce5
commit 873e2296cb
6 changed files with 43 additions and 17 deletions

View File

@ -130,6 +130,7 @@ supertuxkart_SOURCES = main.cpp \
gui/main_menu.cpp gui/main_menu.hpp \
gui/help_page_one.cpp gui/help_page_one.hpp \
gui/help_page_two.cpp gui/help_page_two.hpp \
gui/help_page_three.cpp gui/help_page_three.hpp \
gui/credits_menu.cpp gui/credits_menu.hpp \
gui/grand_prix_select.cpp gui/grand_prix_select.hpp \
gui/challenges_menu.cpp gui/challenges_menu.hpp \

View File

@ -35,6 +35,7 @@ enum WidgetTokens
WTOK_TIMETRIAL,
WTOK_FOLLOW_LEADER,
WTOK_HELP,
WTOK_QUIT
};
@ -75,6 +76,11 @@ GameMode::GameMode()
widget_manager->addEmptyWgt( WidgetManager::WGT_NONE, 1, 7);
widget_manager->addTextButtonWgt( WTOK_HELP, 60, 7, _("Game mode help"));
widget_manager->setWgtTextSize( WTOK_HELP, WGT_FNT_SML );
widget_manager->addEmptyWgt( WidgetManager::WGT_NONE, 1, 7);
widget_manager->addTextButtonWgt(WTOK_QUIT, 60, 7, _("Press <ESC> to go back"));
widget_manager->setWgtTextSize( WTOK_QUIT, WGT_FNT_SML );
@ -108,6 +114,9 @@ void GameMode::select()
race_manager->setRaceMode(RaceManager::RM_TIME_TRIAL);
menu_manager->pushMenu(MENUID_CHARSEL_P1);
break;
case WTOK_HELP:
menu_manager->pushMenu(MENUID_HELP3);
break;
case WTOK_QUIT:
menu_manager->popMenu();
break;

View File

@ -141,11 +141,11 @@ get stuck or fall too far, use the rescue button to get back on track."));
/*Buttons at the bottom*/
widget_manager->addTextButtonWgt(WTOK_SECOND_PAGE, 20, 7,
_("Next screen"));
_("Next help screen"));
widget_manager->breakLine();
widget_manager->addTextButtonWgt(WTOK_QUIT, 40, 7,
_("Go back to the main menu"));
_("Go back to the menu"));
widget_manager->layout( WGT_AREA_TOP );
} // HelpPageOne

View File

@ -39,7 +39,9 @@ enum WidgetTokens
WTOK_IMG6, WTOK_TXT6,
WTOK_FIRST_PAGE,
WTOK_THIRD_PAGE,
WTOK_QUIT
};
HelpPageTwo::HelpPageTwo()
@ -55,65 +57,69 @@ HelpPageTwo::HelpPageTwo()
false
);
widget_manager->addTextWgt( WTOK_MSG, 100, 8,
widget_manager->addTextWgt( WTOK_MSG, 100, 7,
_("To help you win, there are certain collectables you can grab:"));
widget_manager->breakLine();
widget_manager->addImgWgt( WTOK_IMG1, 10, 13,
widget_manager->addImgWgt( WTOK_IMG1, 10, 12,
collectable_manager->getIcon(COLLECT_MISSILE)->getState()->getTextureHandle());
widget_manager->addTextWgt( WTOK_TXT1, 90, 13,
widget_manager->addTextWgt( WTOK_TXT1, 90, 12,
_("Missile - fast stopper in a straight line"));
widget_manager->setWgtRoundCorners( WTOK_TXT1, WGT_AREA_RGT );
widget_manager->breakLine();
widget_manager->addImgWgt(WTOK_IMG2, 10, 13,
widget_manager->addImgWgt(WTOK_IMG2, 10, 12,
collectable_manager->getIcon(COLLECT_HOMING)->getState()->getTextureHandle());
widget_manager->addTextWgt(WTOK_TXT2, 90, 13,
widget_manager->addTextWgt(WTOK_TXT2, 90, 12,
_("Homing missile - follows rivals, but is slower than the missile"));
widget_manager->setWgtRoundCorners( WTOK_TXT2, WGT_AREA_RGT );
widget_manager->breakLine();
widget_manager->addImgWgt(WTOK_IMG3, 10, 13,
widget_manager->addImgWgt(WTOK_IMG3, 10, 12,
collectable_manager->getIcon(COLLECT_SPARK)->getState()->getTextureHandle());
widget_manager->addTextWgt(WTOK_TXT3, 90, 13,
widget_manager->addTextWgt(WTOK_TXT3, 90, 12,
_("Fuzzy blob/Spark - very slow, but bounces from walls"));
widget_manager->setWgtRoundCorners( WTOK_TXT3, WGT_AREA_RGT );
widget_manager->breakLine();
widget_manager->addImgWgt(WTOK_IMG4, 10, 13,
widget_manager->addImgWgt(WTOK_IMG4, 10, 12,
collectable_manager->getIcon(COLLECT_ZIPPER)->getState()->getTextureHandle());
widget_manager->addTextWgt(WTOK_TXT4, 90, 13,
widget_manager->addTextWgt(WTOK_TXT4, 90, 12,
_("Zipper - speed boost"));
widget_manager->setWgtRoundCorners(WTOK_TXT4, WGT_AREA_RGT);
widget_manager->breakLine();
widget_manager->addImgWgt(WTOK_IMG5, 10, 13,
widget_manager->addImgWgt(WTOK_IMG5, 10, 12,
collectable_manager->getIcon(COLLECT_PARACHUTE)->getState()->getTextureHandle());
widget_manager->addTextWgt(WTOK_TXT5, 90, 13,
widget_manager->addTextWgt(WTOK_TXT5, 90, 12,
_("Parachute - slows down all karts in a better position!"));
widget_manager->setWgtRoundCorners(WTOK_TXT5, WGT_AREA_RGT);
widget_manager->breakLine();
widget_manager->addImgWgt(WTOK_IMG6, 10, 13,
widget_manager->addImgWgt(WTOK_IMG6, 10, 12,
collectable_manager->getIcon(COLLECT_ANVIL)->getState()->getTextureHandle());
widget_manager->addTextWgt(WTOK_TXT6, 90, 13,
widget_manager->addTextWgt(WTOK_TXT6, 90, 12,
_("Anvil - slows down greatly the kart in the first position"));
widget_manager->setWgtRoundCorners(WTOK_TXT6, WGT_AREA_RGT);
widget_manager->breakLine();
/*Buttons at the bottom*/
widget_manager->addTextButtonWgt(WTOK_FIRST_PAGE, 25, 7,
widget_manager->addTextButtonWgt(WTOK_FIRST_PAGE, 40, 7,
_("Previous screen"));
widget_manager->breakLine();
widget_manager->addTextButtonWgt(WTOK_THIRD_PAGE, 40, 7,
_("Next help screen"));
widget_manager->breakLine();
widget_manager->addTextButtonWgt(WTOK_QUIT, 40, 7,
_("Go back to the main menu"));
_("Back to the menu"));
widget_manager->layout( WGT_AREA_TOP );
} // HelpMenu
@ -134,6 +140,11 @@ void HelpPageTwo::select()
menu_manager->pushMenu(MENUID_HELP1);
break;
case WTOK_THIRD_PAGE:
menu_manager->popMenu();
menu_manager->pushMenu(MENUID_HELP3);
break;
case WTOK_QUIT:
menu_manager->popMenu();
break;

View File

@ -44,6 +44,7 @@
#include "race_menu.hpp"
#include "help_page_one.hpp"
#include "help_page_two.hpp"
#include "help_page_three.hpp"
#include "credits_menu.hpp"
#include "grand_prix_select.hpp"
#include "sound_manager.hpp"
@ -231,6 +232,9 @@ void MenuManager::update()
case MENUID_HELP2:
m_current_menu = new HelpPageTwo();
break;
case MENUID_HELP3:
m_current_menu = new HelpPageThree();
break;
case MENUID_CREDITS:
m_current_menu = new CreditsMenu();
break;

View File

@ -61,6 +61,7 @@ enum MenuManagerIDs
// help and credit menu
MENUID_HELP1,
MENUID_HELP2,
MENUID_HELP3,
MENUID_CREDITS,
// race gui