Cleanup, mostly in race ending
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@4232 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
8fe5779087
commit
584417910d
@ -174,7 +174,8 @@ void AbstractStateManager::resetAndGoToScreen(Screen* screen)
|
||||
{
|
||||
std::string name = screen->getName();
|
||||
|
||||
race_manager->exitRace();
|
||||
assert(!race_manager->raceIsActive());
|
||||
|
||||
input_manager->setMode(InputManager::MENU);
|
||||
m_menu_stack.clear();
|
||||
m_menu_stack.push_back(name);
|
||||
|
@ -342,11 +342,12 @@ EventPropagation DynamicRibbonWidget::rightPressed(const int playerID)
|
||||
getSelectedRibbon(playerID)->getSelectionText(playerID), playerID);
|
||||
}
|
||||
}
|
||||
std::cout << "rightpressed (dynamic ribbon)\n";
|
||||
//std::cout << "rightpressed (dynamic ribbon)\n";
|
||||
|
||||
assert(m_rows.size() >= 1);
|
||||
if (m_rows[0].m_ribbon_type == RIBBON_TOOLBAR) return EVENT_BLOCK;
|
||||
|
||||
std::cout << " rightpressed returning EVENT_LET\n";
|
||||
//std::cout << " rightpressed returning EVENT_LET\n";
|
||||
|
||||
return EVENT_LET;
|
||||
}
|
||||
@ -367,7 +368,7 @@ EventPropagation DynamicRibbonWidget::leftPressed(const int playerID)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
assert(m_rows.size() >= 1);
|
||||
if (m_rows[0].m_ribbon_type == RIBBON_TOOLBAR) return EVENT_BLOCK;
|
||||
|
||||
return EVENT_LET;
|
||||
|
@ -388,15 +388,13 @@ void RaceManager::exitRace()
|
||||
// TODO - Grand Prix ending
|
||||
// menu_manager->switchToGrandPrixEnding();
|
||||
}
|
||||
else
|
||||
{
|
||||
// FIXME - back to main menu
|
||||
// menu_manager->switchToMainMenu();
|
||||
}
|
||||
|
||||
delete m_world;
|
||||
m_world = NULL;
|
||||
m_track_number = 0;
|
||||
m_active_race = false;
|
||||
|
||||
StateManager::get()->resetActivePlayers();
|
||||
} // exitRace
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -266,7 +266,6 @@ GUIEngine::EventPropagation RaceOverDialog::processEvent(std::string& eventSourc
|
||||
RaceManager::getWorld()->unpause();
|
||||
race_manager->exitRace();
|
||||
StateManager::get()->resetAndGoToScreen(MainMenuScreen::getInstance());
|
||||
input_manager->setMode(InputManager::MENU);
|
||||
return GUIEngine::EVENT_BLOCK;
|
||||
}
|
||||
else if (eventSource == "continuegp")
|
||||
|
@ -238,7 +238,6 @@ GUIEngine::EventPropagation RacePausedDialog::processEvent(std::string& eventSou
|
||||
ModalDialog::dismiss();
|
||||
race_manager->exitRace();
|
||||
StateManager::get()->resetAndGoToScreen(MainMenuScreen::getInstance());
|
||||
input_manager->setMode(InputManager::MENU);
|
||||
return GUIEngine::EVENT_BLOCK;
|
||||
}
|
||||
else if (selection == "help")
|
||||
|
Loading…
Reference in New Issue
Block a user