mirror of
https://github.com/vcmi/vcmi.git
synced 2025-03-19 21:10:12 +02:00
fix music
This commit is contained in:
parent
0a30e86f10
commit
38c0cd138b
client/mainmenu
@ -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<CHighScoreScreen>(calc.isCampaign ? CHighScoreScreen::HighScorePage::CAMPAIGN : CHighScoreScreen::HighScorePage::SCENARIO, pos);
|
||||
}
|
||||
else
|
||||
close();
|
||||
stopMusicAndClose();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user