Corrections to Forty Thieves; wxMemoryDC problem temporarily sorted

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-12-11 09:59:20 +00:00
parent 9ac654169e
commit 16553659df
12 changed files with 118 additions and 50 deletions

View File

@@ -50,7 +50,7 @@ FortyCanvas::FortyCanvas(wxWindow* parent, int x, int y, int w, int h) :
#else
m_font = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
#endif
SetBackgroundColour(*FortyApp::BackgroundColour());
SetBackgroundColour(FortyApp::BackgroundColour());
AllowDoubleClick(true);
m_handCursor = new wxCursor(wxCURSOR_HAND);
@@ -91,7 +91,7 @@ void FortyCanvas::UpdateScores()
void FortyCanvas::OnDraw(wxDC& dc)
{
dc.SetFont(m_font);
dc.SetFont(* m_font);
m_game->Redraw(dc);
// if player name not set (and selection dialog is not displayed)
@@ -141,7 +141,7 @@ void FortyCanvas::OnMouseEvent(wxMouseEvent& event)
wxClientDC dc(this);
PrepareDC(dc);
dc.SetFont(m_font);
dc.SetFont(* m_font);
if (event.LeftDClick())
{
@@ -208,7 +208,7 @@ void FortyCanvas::SetCursorStyle(int x, int y)
wxClientDC dc(this);
PrepareDC(dc);
dc.SetFont(m_font);
dc.SetFont(* m_font);
m_game->Redraw(dc);
}
else
@@ -222,11 +222,11 @@ void FortyCanvas::SetCursorStyle(int x, int y)
// the card under the cursor can go somewhere
if (m_game->CanYouGo(x, y) && m_helpingHand)
{
SetCursor(m_handCursor);
SetCursor(* m_handCursor);
}
else
{
SetCursor(m_arrowCursor);
SetCursor(* m_arrowCursor);
}
}
@@ -241,7 +241,7 @@ void FortyCanvas::Undo()
{
wxClientDC dc(this);
PrepareDC(dc);
dc.SetFont(m_font);
dc.SetFont(* m_font);
m_game->Undo(dc);
}
@@ -249,6 +249,6 @@ void FortyCanvas::Redo()
{
wxClientDC dc(this);
PrepareDC(dc);
dc.SetFont(m_font);
dc.SetFont(* m_font);
m_game->Redo(dc);
}