mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-06 22:23:15 +02:00
@ -216,9 +216,15 @@ CHighScoreInputScreen::CHighScoreInputScreen(bool won, HighScoreCalculation calc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CHighScoreInputScreen::stopMusicAndClose()
|
||||||
|
{
|
||||||
|
CMM->playMusic();
|
||||||
|
close();
|
||||||
|
}
|
||||||
|
|
||||||
void CHighScoreInputScreen::onVideoPlaybackFinished()
|
void CHighScoreInputScreen::onVideoPlaybackFinished()
|
||||||
{
|
{
|
||||||
close();
|
stopMusicAndClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
int CHighScoreInputScreen::addEntry(std::string text) {
|
int CHighScoreInputScreen::addEntry(std::string text) {
|
||||||
@ -275,7 +281,7 @@ void CHighScoreInputScreen::clickPressed(const Point & cursorPosition)
|
|||||||
|
|
||||||
if(!won)
|
if(!won)
|
||||||
{
|
{
|
||||||
close();
|
stopMusicAndClose();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -291,7 +297,7 @@ void CHighScoreInputScreen::clickPressed(const Point & cursorPosition)
|
|||||||
GH.windows().createAndPushWindow<CHighScoreScreen>(calc.isCampaign ? CHighScoreScreen::HighScorePage::CAMPAIGN : CHighScoreScreen::HighScorePage::SCENARIO, pos);
|
GH.windows().createAndPushWindow<CHighScoreScreen>(calc.isCampaign ? CHighScoreScreen::HighScorePage::CAMPAIGN : CHighScoreScreen::HighScorePage::SCENARIO, pos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
close();
|
stopMusicAndClose();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -85,6 +85,7 @@ class CHighScoreInputScreen : public CWindowObject, public IVideoHolder
|
|||||||
HighScoreCalculation calc;
|
HighScoreCalculation calc;
|
||||||
StatisticDataSet stat;
|
StatisticDataSet stat;
|
||||||
|
|
||||||
|
void stopMusicAndClose();
|
||||||
void onVideoPlaybackFinished() override;
|
void onVideoPlaybackFinished() override;
|
||||||
public:
|
public:
|
||||||
CHighScoreInputScreen(bool won, HighScoreCalculation calc, const StatisticDataSet & statistic);
|
CHighScoreInputScreen(bool won, HighScoreCalculation calc, const StatisticDataSet & statistic);
|
||||||
|
Reference in New Issue
Block a user