Apply patch by KroArtem to prevent starting the tutorial from inside the tutorial, thanks

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@12790 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2013-05-27 23:23:40 +00:00
parent bb1b18f602
commit d0c2339915

View File

@@ -19,6 +19,7 @@
#include "challenges/unlock_manager.hpp"
#include "guiengine/widget.hpp"
#include "guiengine/widgets/list_widget.hpp"
#include "guiengine/widgets/ribbon_widget.hpp"
#include "input/device_manager.hpp"
#include "input/input_manager.hpp"
@@ -106,7 +107,17 @@ void HelpScreen1::init()
{
Screen::init();
RibbonWidget* w = this->getWidget<RibbonWidget>("category");
ButtonWidget* tutorial = getWidget<ButtonWidget>("startTutorial");
if (StateManager::get()->getGameState() == GUIEngine::INGAME_MENU)
{
tutorial->setDeactivated();
}
else
{
tutorial->setActivated();
}
if (w != NULL) w->select( "page1", PLAYER_ID_GAME_MASTER );
} //init