1
0
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:
Alexander Wilms
2023-10-08 23:07:25 +02:00
parent 43636af2e4
commit 7c627d8163
5 changed files with 20 additions and 9 deletions

View File

@@ -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();