1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-01 23:12:49 +02:00

Implemented basic version of login window and persistent connection on

client
This commit is contained in:
Ivan Savenko
2023-12-28 21:27:21 +02:00
parent 78833a1015
commit 55b504792e
23 changed files with 278 additions and 59 deletions

View File

@@ -16,6 +16,7 @@
#include "gui/CGuiHandler.h"
#include "gui/WindowHandler.h"
#include "globalLobby/GlobalLobbyClient.h"
#include "lobby/CSelectionBase.h"
#include "lobby/CLobbyScreen.h"
#include "windows/InfoWindows.h"
@@ -139,6 +140,7 @@ CServerHandler::CServerHandler()
: state(EClientState::NONE)
, networkClient(std::make_unique<NetworkClient>(*this))
, applier(std::make_unique<CApplier<CBaseForLobbyApply>>())
, lobbyClient(std::make_unique<GlobalLobbyClient>())
, client(nullptr)
, loadMode(0)
, campaignStateToSend(nullptr)
@@ -175,6 +177,11 @@ void CServerHandler::resetStateForLobby(const StartInfo::EMode mode, const std::
myNames.push_back(settings["general"]["playerName"].String());
}
GlobalLobbyClient & CServerHandler::getGlobalLobby()
{
return *lobbyClient;
}
void CServerHandler::startLocalServerAndConnect()
{
if(threadRunLocalServer)