1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

initial highscore support

This commit is contained in:
Laserlicht
2023-09-22 01:39:35 +02:00
committed by GitHub
parent ec582328b4
commit 92b0e2b400
16 changed files with 652 additions and 357 deletions

View File

@@ -12,6 +12,7 @@
#include "CCampaignScreen.h"
#include "CreditsScreen.h"
#include "CHighScoreScreen.h"
#include "../lobby/CBonusSelection.h"
#include "../lobby/CSelectionBase.h"
@@ -210,7 +211,7 @@ static std::function<void()> genCommand(CMenuScreen * menu, std::vector<std::str
break;
case 5: //highscores
{
return std::bind(CInfoWindow::showInfoDialog, CGI->generaltexth->translate("vcmi.mainMenu.highscoresNotImplemented"), std::vector<std::shared_ptr<CComponent>>(), PlayerColor(1));
return std::bind(CMainMenu::openHighScoreScreen);
}
}
}
@@ -389,6 +390,12 @@ void CMainMenu::startTutorial()
CSH->startMapAfterConnection(mapInfo);
}
void CMainMenu::openHighScoreScreen()
{
GH.windows().createAndPushWindow<CHighScoreScreen>();
return;
}
std::shared_ptr<CMainMenu> CMainMenu::create()
{
if(!CMM)