void NetPlayDialog::OnChangeGame(wxCommandEvent&) { ChangeGameDialog cgd(this, m_game_list); cgd.ShowModal(); wxString game_name = cgd.GetChosenGameName(); if (game_name.empty()) return; m_selected_game = WxStrToStr(game_name); netplay_server->ChangeGame(m_selected_game); m_game_btn->SetLabel(game_name.Prepend(_(" Game : "))); }
void NetPlayDialog::OnChangeGame(wxCommandEvent&) { wxString game_name; ChangeGameDialog cgd(this, m_game_list, game_name); cgd.ShowModal(); if (game_name.length()) { m_selected_game = WxStrToStr(game_name); netplay_server->ChangeGame(m_selected_game); m_game_btn->SetLabel(game_name.Prepend(_(" Game : "))); } }