diff --git a/client/mainmenu/CHighScoreScreen.cpp b/client/mainmenu/CHighScoreScreen.cpp index ab985497a..ab0ae6b4e 100644 --- a/client/mainmenu/CHighScoreScreen.cpp +++ b/client/mainmenu/CHighScoreScreen.cpp @@ -216,9 +216,15 @@ CHighScoreInputScreen::CHighScoreInputScreen(bool won, HighScoreCalculation calc } } +void CHighScoreInputScreen::stopMusicAndClose() +{ + CMM->playMusic(); + close(); +} + void CHighScoreInputScreen::onVideoPlaybackFinished() { - close(); + stopMusicAndClose(); } int CHighScoreInputScreen::addEntry(std::string text) { @@ -275,7 +281,7 @@ void CHighScoreInputScreen::clickPressed(const Point & cursorPosition) if(!won) { - close(); + stopMusicAndClose(); return; } @@ -291,7 +297,7 @@ void CHighScoreInputScreen::clickPressed(const Point & cursorPosition) GH.windows().createAndPushWindow(calc.isCampaign ? CHighScoreScreen::HighScorePage::CAMPAIGN : CHighScoreScreen::HighScorePage::SCENARIO, pos); } else - close(); + stopMusicAndClose(); }); } } diff --git a/client/mainmenu/CHighScoreScreen.h b/client/mainmenu/CHighScoreScreen.h index e0c3b5c69..a8d68011e 100644 --- a/client/mainmenu/CHighScoreScreen.h +++ b/client/mainmenu/CHighScoreScreen.h @@ -85,6 +85,7 @@ class CHighScoreInputScreen : public CWindowObject, public IVideoHolder HighScoreCalculation calc; StatisticDataSet stat; + void stopMusicAndClose(); void onVideoPlaybackFinished() override; public: CHighScoreInputScreen(bool won, HighScoreCalculation calc, const StatisticDataSet & statistic);