1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Added list of active accounts and rooms to UI. Added room creation logic

This commit is contained in:
Ivan Savenko
2024-01-21 16:48:36 +02:00
parent 9e62eb28c5
commit 388ca6e776
37 changed files with 698 additions and 304 deletions

View File

@@ -125,17 +125,15 @@ void GlobalLobbyServerSetup::onGameModeChanged(int value)
void GlobalLobbyServerSetup::onCreate()
{
if(toggleGameMode->getSelected() == 0)
{
CSH->resetStateForLobby(StartInfo::NEW_GAME, nullptr);
CSH->screenType = ESelectionScreen::newGame;
}
CSH->resetStateForLobby(EStartMode::NEW_GAME, ESelectionScreen::newGame, {});
else
{
CSH->resetStateForLobby(StartInfo::LOAD_GAME, nullptr);
CSH->screenType = ESelectionScreen::loadGame;
}
CSH->resetStateForLobby(EStartMode::LOAD_GAME, ESelectionScreen::loadGame, {});
CSH->loadMode = ELoadMode::MULTI;
CSH->startLocalServerAndConnect(true);
buttonCreate->block(true);
buttonClose->block(true);
}
void GlobalLobbyServerSetup::onClose()