Some doc corrections (added blank lines at end of docs); corrected Forty sample
dialog behaviour; added dummy menubar constructors; corrected wxMSW wxRegion bug git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1684 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -51,7 +51,6 @@ FortyCanvas::FortyCanvas(wxWindow* parent, int x, int y, int w, int h) :
|
||||
m_font = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
|
||||
#endif
|
||||
SetBackgroundColour(FortyApp::BackgroundColour());
|
||||
AllowDoubleClick(TRUE);
|
||||
|
||||
m_handCursor = new wxCursor(wxCURSOR_HAND);
|
||||
m_arrowCursor = new wxCursor(wxCURSOR_ARROW);
|
||||
@@ -98,7 +97,7 @@ void FortyCanvas::OnDraw(wxDC& dc)
|
||||
// then ask the player for their name
|
||||
if (m_player.Length() == 0 && !m_playerDialog)
|
||||
{
|
||||
m_playerDialog = new PlayerSelectionDialog(this, m_scoreFile);
|
||||
m_playerDialog = new PlayerSelectionDialog(this, m_scoreFile);
|
||||
m_playerDialog->ShowModal();
|
||||
m_player = m_playerDialog->GetPlayersName();
|
||||
if (m_player.Length() > 0)
|
||||
@@ -108,7 +107,7 @@ void FortyCanvas::OnDraw(wxDC& dc)
|
||||
m_scoreFile->ReadPlayersScore(m_player, wins, games, score);
|
||||
m_game->NewPlayer(wins, games, score);
|
||||
m_game->DisplayScore(dc);
|
||||
delete m_playerDialog;
|
||||
m_playerDialog->Destroy();
|
||||
m_playerDialog = 0;
|
||||
Refresh();
|
||||
}
|
||||
|
@@ -41,7 +41,7 @@
|
||||
#include "forty.h"
|
||||
#include "card.h"
|
||||
|
||||
#ifdef __WXGTK__
|
||||
#if defined(__WXGTK__) || defined(__WXMOTIF__)
|
||||
#include "pictures.xpm"
|
||||
#include "symbols.xbm"
|
||||
#endif
|
||||
|
@@ -91,7 +91,7 @@ bool FortyApp::OnInit()
|
||||
-1, -1, 668, 510
|
||||
);
|
||||
|
||||
// Show the frame
|
||||
// Show the frame
|
||||
frame->Show(TRUE);
|
||||
|
||||
return TRUE;
|
||||
@@ -192,7 +192,7 @@ FortyFrame::~FortyFrame()
|
||||
|
||||
void FortyFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
{
|
||||
if (m_canvas->OnCloseCanvas())
|
||||
if (m_canvas->OnCloseCanvas() )
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
|
@@ -172,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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user