Don't reload the multiplayer configuration...

...if the user just noticed that he prefers a single-player game.
This commit is contained in:
Guillaume Melquiond 2005-05-07 20:53:48 +00:00
parent 036aa6b202
commit 5005af382e

View File

@ -1081,18 +1081,32 @@ bool game_controller::play_multiplayer()
std::vector<std::string> host_or_join;
std::string const pre = IMAGE_PREFIX + std::string("icons/icon-");
char const sep1 = COLUMN_SEPARATOR, sep2 = HELP_STRING_SEPARATOR;
host_or_join.push_back(pre + "server.png" + sep1 + _("Join Official Server") + sep2 + _("Log on to the official Wesnoth multiplayer server"));
host_or_join.push_back(pre + "serverother.png" + sep1 + _("Join Game") + sep2 + _("Join a server or hosted game"));
host_or_join.push_back(pre + "hostgame.png" + sep1 + _("Host Networked Game") + sep2 + _("Host a game without using a server"));
host_or_join.push_back(pre + "hotseat.png" + sep1 + _("Hotseat Game") + sep2 + _("Play a multiplayer game sharing the same machine"));
host_or_join.push_back(pre + "ai.png" + sep1 + _("Human vs AI") + sep2 + _("Play a game against AI opponents"));
host_or_join.push_back(pre + "server.png"
+ sep1 + _("Join Official Server")
+ sep2 + _("Log on to the official Wesnoth multiplayer server"));
host_or_join.push_back(pre + "serverother.png"
+ sep1 + _("Join Game")
+ sep2 + _("Join a server or hosted game"));
host_or_join.push_back(pre + "hostgame.png"
+ sep1 + _("Host Networked Game")
+ sep2 + _("Host a game without using a server"));
host_or_join.push_back(pre + "hotseat.png"
+ sep1 + _("Hotseat Game")
+ sep2 + _("Play a multiplayer game sharing the same machine"));
host_or_join.push_back(pre + "ai.png"
+ sep1 + _("Human vs AI")
+ sep2 + _("Play a game against AI opponents"));
std::string login = preferences::login();
const int res = gui::show_dialog(disp(),NULL,_("Multiplayer"),"",gui::OK_CANCEL,&host_or_join,NULL,_("Login: "),&login);
if(res >= 0) {
preferences::set_login(login);
}
int res = gui::show_dialog(disp(), NULL, _("Multiplayer"), "",
gui::OK_CANCEL, &host_or_join, NULL,
_("Login: "), &login);
if (res < 0)
return false;
preferences::set_login(login);
try {
defines_map_.clear();