Show GP progress even if something is unlocked

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@10136 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria
2011-11-08 01:50:31 +00:00
parent 4666300d93
commit b2fe74e0c2

View File

@@ -84,6 +84,11 @@ void RaceResultGUI::enableAllButtons()
GUIEngine::Widget *middle = getWidget("middle");
GUIEngine::Widget *bottom = getWidget("bottom");
if (race_manager->getMajorMode()==RaceManager::MAJOR_MODE_GRAND_PRIX)
{
enableGPProgress();
}
// If something was unlocked
// -------------------------
int n = unlock_manager->getRecentlyUnlockedFeatures().size();
@@ -96,7 +101,6 @@ void RaceResultGUI::enableAllButtons()
}
else if (race_manager->getMajorMode()==RaceManager::MAJOR_MODE_GRAND_PRIX)
{
enableGPProgress();
// In case of a GP:
// ----------------
top->setVisible(false);
@@ -139,6 +143,11 @@ void RaceResultGUI::eventCallback(GUIEngine::Widget* widget,
{
if(name=="top")
{
if (race_manager->getMajorMode() == RaceManager::MAJOR_MODE_GRAND_PRIX)
{
cleanupGPProgress();
}
std::vector<const ChallengeData*> unlocked =
unlock_manager->getRecentlyUnlockedFeatures();
unlock_manager->clearUnlocked();