mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-21 19:19:26 +02:00
Open lobby when players leaves pregame menu opened via lobby
This commit is contained in:
parent
73d8789f8d
commit
b9cd9a5822
@ -23,6 +23,7 @@
|
|||||||
#include "../widgets/Buttons.h"
|
#include "../widgets/Buttons.h"
|
||||||
#include "../windows/InfoWindows.h"
|
#include "../windows/InfoWindows.h"
|
||||||
#include "../render/Colors.h"
|
#include "../render/Colors.h"
|
||||||
|
#include "../globalLobby/GlobalLobbyClient.h"
|
||||||
|
|
||||||
#include "../../CCallback.h"
|
#include "../../CCallback.h"
|
||||||
|
|
||||||
@ -104,8 +105,12 @@ CLobbyScreen::CLobbyScreen(ESelectionScreen screenType)
|
|||||||
|
|
||||||
buttonBack = std::make_shared<CButton>(Point(581, 535), AnimationPath::builtin("SCNRBACK.DEF"), CGI->generaltexth->zelp[105], [&]()
|
buttonBack = std::make_shared<CButton>(Point(581, 535), AnimationPath::builtin("SCNRBACK.DEF"), CGI->generaltexth->zelp[105], [&]()
|
||||||
{
|
{
|
||||||
|
bool wasInLobbyRoom = CSH->inLobbyRoom();
|
||||||
CSH->sendClientDisconnecting();
|
CSH->sendClientDisconnecting();
|
||||||
close();
|
close();
|
||||||
|
|
||||||
|
if (wasInLobbyRoom)
|
||||||
|
CSH->getGlobalLobby().activateInterface();
|
||||||
}, EShortcut::GLOBAL_CANCEL);
|
}, EShortcut::GLOBAL_CANCEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user