Make number of laps value persistent

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@6318 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2010-10-24 00:55:21 +00:00
parent 33d535a991
commit dbf3ec0b09

View File

@ -125,7 +125,7 @@ TrackInfoDialog::TrackInfoDialog(const std::string& trackIdent, const irr::core:
m_widgets.push_back(m_spinner);
m_spinner->add();
m_spinner->setValue(3);
m_spinner->setValue( UserConfigParams::m_num_laps );
m_spinner->getIrrlichtElement()->setTabStop(true);
m_spinner->getIrrlichtElement()->setTabGroup(false);
}
@ -325,6 +325,7 @@ GUIEngine::EventPropagation TrackInfoDialog::processEvent(const std::string& eve
assert(m_spinner != NULL);
const int num_laps = m_spinner->getValue();
race_manager->setNumLaps(num_laps);
UserConfigParams::m_num_laps = num_laps;
updateHighScores();
}