mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Show info dialog when connection to multiplayer server fails
This commit is contained in:
@@ -589,6 +589,15 @@ void CSimpleJoinScreen::connectThread(const std::string & addr, ui16 port)
|
||||
|
||||
// async call to prevent thread race
|
||||
GH.dispatchMainThread([this](){
|
||||
if(CSH->state == EClientState::CONNECTION_FAILED)
|
||||
{
|
||||
CInfoWindow::showInfoDialog(CGI->generaltexth->translate("vcmi.mainMenu.serverConnectionFailed"), {});
|
||||
|
||||
textTitle->setText(CGI->generaltexth->translate("vcmi.mainMenu.serverAddressEnter"));
|
||||
GH.startTextInput(inputAddress->pos);
|
||||
buttonOk->block(false);
|
||||
}
|
||||
|
||||
if(GH.windows().isTopWindow(this))
|
||||
{
|
||||
close();
|
||||
|
||||
Reference in New Issue
Block a user