1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-11 01:10:26 +02:00

Add game pause

This commit is contained in:
nordsoft
2023-10-07 01:44:37 +02:00
parent 088ce9b948
commit d7d435dcb7
23 changed files with 83 additions and 18 deletions

View File

@ -41,6 +41,8 @@ CSavingScreen::CSavingScreen()
curTab = tabSel;
buttonStart = std::make_shared<CButton>(Point(411, 535), AnimationPath::builtin("SCNRSAV.DEF"), CGI->generaltexth->zelp[103], std::bind(&CSavingScreen::saveGame, this), EShortcut::LOBBY_SAVE_GAME);
LOCPLINT->gamePause(true);
}
const CMapInfo * CSavingScreen::getMapInfo()
@ -65,6 +67,12 @@ void CSavingScreen::changeSelection(std::shared_ptr<CMapInfo> to)
card->redraw();
}
void CSavingScreen::close()
{
LOCPLINT->gamePause(false);
CSelectionBase::close();
}
void CSavingScreen::saveGame()
{
if(!(tabSel && tabSel->inputName && tabSel->inputName->getText().size()))