Reset time target if leaving the soccer screen with escape

This commit is contained in:
Benau 2016-12-30 15:02:07 +08:00
parent 5b96b4aa3f
commit cb5f24e551
2 changed files with 9 additions and 0 deletions

@ -487,3 +487,10 @@ void SoccerSetupScreen::updateKartViewsLayout()
view_info.view->move(pos_x, pos_y, kart_view_size, kart_view_size);
}
} // updateKartViewsLayout
// -----------------------------------------------------------------------------
bool SoccerSetupScreen::onEscapePressed()
{
race_manager->setTimeTarget(0.0f);
return true;
} // onEscapePressed

@ -76,6 +76,8 @@ public:
Input::InputType type,
int playerId) OVERRIDE;
virtual bool onEscapePressed() OVERRIDE;
private:
bool areAllKartsConfirmed() const;
int getNumConfirmedKarts();