X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/63cafd2799b6e9dcbe34ce63635f1f8a807d895f..f57fe24c6389876d7ddf02aa7a09f3b48a6956de:/samples/forty/playerdg.cpp diff --git a/samples/forty/playerdg.cpp b/samples/forty/playerdg.cpp index 38160488da..e55cd0f93d 100644 --- a/samples/forty/playerdg.cpp +++ b/samples/forty/playerdg.cpp @@ -44,7 +44,7 @@ PlayerSelectionDialog::PlayerSelectionDialog( ScoreFile* file ) : wxDialog(parent, -1, "Player Selection", - wxDefaultPosition, wxSize(250, 200), + wxDefaultPosition, wxSize(320, 200), wxDIALOG_MODAL | wxDEFAULT_DIALOG_STYLE), m_scoreFile(file) { @@ -59,14 +59,13 @@ PlayerSelectionDialog::PlayerSelectionDialog( 0, 0, wxLB_SINGLE ); - int numPlayers = 0; - wxString* players = 0; - m_scoreFile->GetPlayerList(&players, numPlayers); - for (int i = 0; i < numPlayers; i++) + + wxArrayString players; + m_scoreFile->GetPlayerList(players); + for (unsigned int i = 0; i < players.Count(); i++) { list->Append(players[i]); } - delete players; m_textField = new wxTextCtrl(this, -1, "", wxDefaultPosition, wxDefaultSize, 0); @@ -129,15 +128,17 @@ PlayerSelectionDialog::~PlayerSelectionDialog() { } -void PlayerSelectionDialog::OnSize(wxSizeEvent& event) +void PlayerSelectionDialog::OnSize(wxSizeEvent& WXUNUSED(event)) { Layout(); } const wxString& PlayerSelectionDialog::GetPlayersName() { +/* m_player = ""; Show(TRUE); +*/ return m_player; }