warning msgs
toolbar updates mdi fixes dnd works now Forty Thieves drawing optimization wxDF_Text constants ListCtrl bugs fixed memory leak work imrc now refers to home dir dcclient/memory leak fixed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@381 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -109,6 +109,7 @@ void FortyCanvas::OnDraw(wxDC& dc)
|
||||
m_game->DisplayScore(dc);
|
||||
delete m_playerDialog;
|
||||
m_playerDialog = 0;
|
||||
Refresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -11,12 +11,12 @@
|
||||
// Last modified: 22nd July 1998 - ported to wxWindows 2.0
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//+-------------------------------------------------------------+
|
||||
//| Description: |
|
||||
//| A class for drawing playing cards. |
|
||||
//| Currently assumes that the card symbols have been |
|
||||
//| loaded into hbmap_symbols and the pictures for the |
|
||||
//| Jack, Queen and King have been loaded into |
|
||||
//| hbmap_pictures. |
|
||||
//| Description
|
||||
//| A class for drawing playing cards.
|
||||
//| Currently assumes that the card symbols have been
|
||||
//| loaded into hbmap_symbols and the pictures for the
|
||||
//| Jack, Queen and King have been loaded into
|
||||
//| hbmap_pictures.
|
||||
//+-------------------------------------------------------------+
|
||||
|
||||
#ifdef __GNUG__
|
||||
|
@@ -41,6 +41,7 @@
|
||||
#include "card.h"
|
||||
#include "pile.h"
|
||||
|
||||
#include "wx/app.h"
|
||||
|
||||
//+-------------------------------------------------------------+
|
||||
//| Pile::Pile() |
|
||||
@@ -72,13 +73,22 @@ Pile::Pile(int x, int y, int dx, int dy)
|
||||
//| at the origin of the pile, shifting each subsequent |
|
||||
//| card by the pile's x and y offsets. |
|
||||
//+-------------------------------------------------------------+
|
||||
void Pile::Redraw(wxDC& dc)
|
||||
void Pile::Redraw(wxDC& dc )
|
||||
{
|
||||
wxWindow *frame = wxTheApp->GetTopWindow();
|
||||
wxWindow *canvas = NULL;
|
||||
if (frame)
|
||||
{
|
||||
wxNode *node = frame->GetChildren()->First();
|
||||
if (node) canvas = (wxWindow*)node->Data();
|
||||
}
|
||||
|
||||
if (m_topCard >= 0)
|
||||
{
|
||||
if (m_dx == 0 && m_dy == 0)
|
||||
{
|
||||
m_cards[m_topCard]->Draw(dc, m_x, m_y);
|
||||
if ((canvas) && (canvas->IsExposed(m_x,m_y,60,200)))
|
||||
m_cards[m_topCard]->Draw(dc, m_x, m_y);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -86,14 +96,16 @@ void Pile::Redraw(wxDC& dc)
|
||||
int y = m_y;
|
||||
for (int i = 0; i <= m_topCard; i++)
|
||||
{
|
||||
m_cards[i]->Draw(dc, x, y);
|
||||
x += m_dx;
|
||||
y += m_dy;
|
||||
if ((canvas) && (canvas->IsExposed(x,y,60,200)))
|
||||
m_cards[i]->Draw(dc, x, y);
|
||||
x += m_dx;
|
||||
y += m_dy;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((canvas) && (canvas->IsExposed(m_x,m_y,60,200)))
|
||||
Card::DrawNullCard(dc, m_x, m_y);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user