示例#1
0
void NetPlayDialog::OnStart(wxCommandEvent&)
{
    NetSettings settings;
    GetNetSettings(settings);
    netplay_server->SetNetSettings(settings);
    netplay_server->StartGame();
}
示例#2
0
void NetPlayDialog::OnStart(wxCommandEvent&)
{
  bool should_start = true;
  if (!netplay_client->DoAllPlayersHaveGame())
  {
    should_start = wxMessageBox(_("Not all players have the game. Do you really want to start?"),
      _("Warning"), wxYES_NO) == wxYES;
  }

  if (!should_start)
    return;

  NetSettings settings;
  GetNetSettings(settings);
  netplay_server->SetNetSettings(settings);
  netplay_server->StartGame();
}