Prevent locked tracks from being played in the high score info dialog

This commit is contained in:
Richard Qian 2021-08-09 14:11:54 -05:00
parent 35ddf4c4d9
commit 7913457e63

View File

@ -139,7 +139,10 @@ HighScoreInfoDialog::HighScoreInfoDialog(Highscores* highscore, bool is_linear,
m_start_widget = getWidget<IconButtonWidget>("start");
// Disable starting a grand prix, as there is currently no way to tell the minor mode used
getWidget<IconButtonWidget>("start")->setActive(major_mode == RaceManager::MAJOR_MODE_SINGLE);
if (m_major_mode == RaceManager::MAJOR_MODE_GRAND_PRIX)
m_start_widget->setActive(false);
else
m_start_widget->setActive(!PlayerManager::getCurrentPlayer()->isLocked(track->getIdent()));
m_action_widget = getWidget<RibbonWidget>("actions");