Allow selecting who you are

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10377 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2011-12-08 01:02:47 +00:00
parent b1963a7a50
commit b338e1f0d6

View File

@ -177,6 +177,12 @@ void MainMenuScreen::onUpdate(float delta, irr::video::IVideoDriver* driver)
void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
const int playerID)
{
if (name == "playername")
{
UserConfigParams::m_default_player = L"";
StateManager::get()->resetAndGoToScreen(StoryModeLobbyScreen::getInstance());
}
// most interesting stuff is in the ribbons, so start there
RibbonWidget* ribbon = dynamic_cast<RibbonWidget*>(widget);
@ -289,10 +295,6 @@ void MainMenuScreen::eventCallback(Widget* widget, const std::string& name,
{
StateManager::get()->pushScreen(ChallengesScreen::getInstance());
}
else if (selection == "story")
{
StateManager::get()->pushScreen(StoryModeLobbyScreen::getInstance());
}
else if (selection == "tutorial")
{
StateManager::get()->pushScreen(TutorialScreen::getInstance());