1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

restore last used address in Multiplayer join dialog

in all other cases (when machine is host) hardcoded localhost address is displayed
This commit is contained in:
Andrey Filipenkov
2022-10-01 17:41:12 +03:00
parent 1aefbd14a7
commit 8f51a8756b
3 changed files with 18 additions and 6 deletions

View File

@@ -481,7 +481,7 @@ CSimpleJoinScreen::CSimpleJoinScreen(bool host)
inputAddress->giveFocus();
}
inputAddress->setText(settings["server"]["server"].String(), true);
inputAddress->setText(host ? CServerHandler::localhostAddress : settings["server"]["server"].String(), true);
inputPort->setText(CServerHandler::getDefaultPortStr(), true);
buttonCancel = std::make_shared<CButton>(Point(142, 142), "MUBCANC.DEF", CGI->generaltexth->zelp[561], std::bind(&CSimpleJoinScreen::leaveScreen, this), SDLK_ESCAPE);