1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +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

@@ -35,6 +35,7 @@ VCMI_LIB_NAMESPACE_END
class CClient;
class CBaseForLobbyApply;
class GlobalLobbyClient;
class HighScoreCalculation;
class HighScoreParameter;
@@ -86,6 +87,7 @@ class CServerHandler : public IServerAPI, public LobbyInfo, public INetworkClien
friend class ApplyOnLobbyHandlerNetPackVisitor;
std::unique_ptr<NetworkClient> networkClient;
std::unique_ptr<GlobalLobbyClient> lobbyClient;
std::unique_ptr<CApplier<CBaseForLobbyApply>> applier;
std::shared_ptr<CMapInfo> mapToStart;
std::vector<std::string> myNames;
@@ -138,6 +140,8 @@ public:
void startLocalServerAndConnect();
void connectToServer(const std::string & addr, const ui16 port);
GlobalLobbyClient & getGlobalLobby();
// Helpers for lobby state access
std::set<PlayerColor> getHumanColors();
PlayerColor myFirstColor() const;