X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e306597309a120f2ae91385c731a5cb2722c52aa..29ea4a290850e9ae79c258774fa22153a951ff7f:/samples/forty/playerdg.cpp diff --git a/samples/forty/playerdg.cpp b/samples/forty/playerdg.cpp index dc04b7f4c7..fa3ea03d04 100644 --- a/samples/forty/playerdg.cpp +++ b/samples/forty/playerdg.cpp @@ -153,9 +153,7 @@ void PlayerSelectionDialog::SelectCallback(wxCommandEvent& event) { if (event.GetEventType() == wxEVT_COMMAND_LISTBOX_SELECTED) { -#ifdef __WXGTK__ - if (event.IsSelection()) -#endif +// if (event.IsSelection()) m_textField->SetValue(event.GetString()); } } @@ -174,17 +172,17 @@ void PlayerSelectionDialog::ButtonCallback(wxCommandEvent& event) else { m_player = name; - Show(FALSE); + EndModal(wxID_OK); } } else { - wxMessageBox("Please enter your name", "Forty Thieves"); + wxMessageBox("Please enter your name", "Forty Thieves"); } } else { m_player = ""; - Show(FALSE); + EndModal(wxID_CANCEL); } }