1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Added GameInstance class

- available as global GAME
- integrates LOCPLINT (CPlayerInterface)
- integrates CGI->mh (CMapHandler)
- integrates CSH (CServerHandler)
This commit is contained in:
Ivan Savenko
2025-02-11 15:23:33 +00:00
parent ffd37a8fa8
commit 156de5b17e
98 changed files with 1288 additions and 1131 deletions

View File

@ -18,6 +18,7 @@
#include "../CPlayerInterface.h"
#include "../GameEngine.h"
#include "../GameInstance.h"
#include "../gui/Shortcut.h"
#include "../gui/WindowHandler.h"
#include "../widgets/Images.h"
@ -69,8 +70,8 @@ void CTutorialWindow::openWindowFirstTime(const TutorialMode & m)
{
if(ENGINE->input().getCurrentInputMode() == InputMode::TOUCH && !persistentStorage["gui"]["tutorialCompleted" + std::to_string(m)].Bool())
{
if(LOCPLINT)
LOCPLINT->showingDialog->setBusy();
if(GAME->interface())
GAME->interface()->showingDialog->setBusy();
ENGINE->windows().pushWindow(std::make_shared<CTutorialWindow>(m));
Settings s = persistentStorage.write["gui"]["tutorialCompleted" + std::to_string(m)];
@ -80,8 +81,8 @@ void CTutorialWindow::openWindowFirstTime(const TutorialMode & m)
void CTutorialWindow::exit()
{
if(LOCPLINT)
LOCPLINT->showingDialog->setFree();
if(GAME->interface())
GAME->interface()->showingDialog->setFree();
close();
}