Applied patch [ 807060 ] warning free demos
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23668 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f0b1ccde63
commit
babd36de3a
@ -40,7 +40,7 @@ bool AppClass::OnInit()
|
||||
level=IDM_EASY;
|
||||
|
||||
BombsFrame =
|
||||
new BombsFrameClass(NULL, _T("wxBombs"), wxPoint(155, 165), wxSize(300, 300), wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION);
|
||||
new BombsFrameClass(NULL, _T("wxBombs"), wxPoint(155, 165), wxSize(300, 300), wxMINIMIZE_BOX | wxSYSTEM_MENU | wxCAPTION | wxCLOSE_BOX );
|
||||
|
||||
int xmax=BombsFrame->BombsCanvas->field_width*BombsFrame->BombsCanvas->x_cell*X_UNIT;
|
||||
int ymax=BombsFrame->BombsCanvas->field_height*BombsFrame->BombsCanvas->y_cell*Y_UNIT;
|
||||
@ -104,17 +104,17 @@ BombsFrameClass::~BombsFrameClass(void)
|
||||
{
|
||||
}
|
||||
|
||||
void BombsFrameClass::OnCloseWindow(wxCloseEvent& event)
|
||||
void BombsFrameClass::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
|
||||
void BombsFrameClass::OnExit(wxCommandEvent& event)
|
||||
void BombsFrameClass::OnExit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
|
||||
void BombsFrameClass::OnRestart(wxCommandEvent& event)
|
||||
void BombsFrameClass::OnRestart(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
BombsCanvas->UpdateFieldSize();
|
||||
int xmax=BombsCanvas->field_width*BombsCanvas->x_cell*X_UNIT;
|
||||
@ -122,26 +122,26 @@ void BombsFrameClass::OnRestart(wxCommandEvent& event)
|
||||
wxGetApp().BombsFrame->SetClientSize(xmax, ymax);
|
||||
}
|
||||
|
||||
void BombsFrameClass::OnAbout(wxCommandEvent& event)
|
||||
void BombsFrameClass::OnAbout(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
wxMessageBox(_T("wxBombs (c) 1996 by P. Foggia\n<foggia@amalfi.dis.unina.it>"), _T("About wxBombs"));
|
||||
}
|
||||
|
||||
void BombsFrameClass::OnEasy(wxCommandEvent& event)
|
||||
void BombsFrameClass::OnEasy(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
menuBar->Check(wxGetApp().level, FALSE);
|
||||
wxGetApp().level=IDM_EASY;
|
||||
menuBar->Check(wxGetApp().level, TRUE);
|
||||
}
|
||||
|
||||
void BombsFrameClass::OnMedium(wxCommandEvent& event)
|
||||
void BombsFrameClass::OnMedium(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
menuBar->Check(wxGetApp().level, FALSE);
|
||||
wxGetApp().level=IDM_MEDIUM;
|
||||
menuBar->Check(wxGetApp().level, TRUE);
|
||||
}
|
||||
|
||||
void BombsFrameClass::OnDifficult(wxCommandEvent& event)
|
||||
void BombsFrameClass::OnDifficult(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
menuBar->Check(wxGetApp().level, FALSE);
|
||||
wxGetApp().level=IDM_DIFFICULT;
|
||||
@ -169,8 +169,8 @@ BombsCanvasClass::BombsCanvasClass(wxFrame *parent, const wxPoint& pos, const wx
|
||||
|
||||
dc.SetMapMode(wxMM_METRIC);
|
||||
|
||||
int xcm = dc.LogicalToDeviceX(10.0);
|
||||
int ycm = dc.LogicalToDeviceY(10.0);
|
||||
int xcm = dc.LogicalToDeviceX(10);
|
||||
int ycm = dc.LogicalToDeviceY(10);
|
||||
// To have a square cell, there must be :
|
||||
// sx*ycm == sy*xcm
|
||||
if (chw*ycm < chh*xcm)
|
||||
@ -195,7 +195,7 @@ BombsCanvasClass::~BombsCanvasClass(void)
|
||||
}
|
||||
|
||||
// Called when canvas needs to be repainted.
|
||||
void BombsCanvasClass::OnPaint(wxPaintEvent& event)
|
||||
void BombsCanvasClass::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
{
|
||||
wxPaintDC dc(this);
|
||||
|
||||
|
@ -94,7 +94,7 @@ class BombsCanvasClass: public wxWindow
|
||||
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
void DrawField(wxDC *, int xc1, int yc1, int xc2, int yc2);
|
||||
void Refresh(int xc1, int yc1, int xc2, int yc2);
|
||||
void RefreshField(int xc1, int yc1, int xc2, int yc2);
|
||||
void Uncover(int x, int y);
|
||||
void OnEvent(wxMouseEvent& event);
|
||||
void UpdateFieldSize();
|
||||
|
@ -148,12 +148,12 @@ void BombsCanvasClass::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2)
|
||||
}
|
||||
}
|
||||
|
||||
/*-------- BombCanvasClass::Refresh(xc1, yc1, xc2, yc2) -------------*/
|
||||
/*-------- BombCanvasClass::RefreshField(xc1, yc1, xc2, yc2) --------*/
|
||||
/* Refreshes the field image */
|
||||
/* xc1,yc1 etc. are the (inclusive) limits of the area to be drawn, */
|
||||
/* expressed in cells. */
|
||||
/*---------------------------------------------------------------------*/
|
||||
void BombsCanvasClass::Refresh(int xc1, int yc1, int xc2, int yc2)
|
||||
void BombsCanvasClass::RefreshField(int xc1, int yc1, int xc2, int yc2)
|
||||
{
|
||||
wxClientDC dc(this);
|
||||
DrawField(& dc, xc1, yc1, xc2, yc2);
|
||||
@ -169,7 +169,7 @@ void BombsCanvasClass::Refresh(int xc1, int yc1, int xc2, int yc2)
|
||||
void BombsCanvasClass::Uncover(int x, int y)
|
||||
{
|
||||
wxGetApp().Game.Unhide(x,y);
|
||||
Refresh(x, y, x, y);
|
||||
RefreshField(x, y, x, y);
|
||||
if (wxGetApp().Game.IsBomb(x,y) || wxGetApp().Game.GetRemainingCells()==0)
|
||||
{ wxBell();
|
||||
if (!wxGetApp().Game.IsBomb(x,y))
|
||||
@ -182,7 +182,7 @@ void BombsCanvasClass::Uncover(int x, int y)
|
||||
for(x=0; x<field_width; x++)
|
||||
for(y=0; y<field_height; y++)
|
||||
wxGetApp().Game.Unhide(x,y);
|
||||
Refresh(0, 0, field_width-1, field_height-1);
|
||||
RefreshField(0, 0, field_width-1, field_height-1);
|
||||
}
|
||||
else if (!wxGetApp().Game.Get(x, y))
|
||||
{ int left = ( x > 0 ) ? x-1 : 0;
|
||||
@ -212,7 +212,7 @@ void BombsCanvasClass::OnEvent(wxMouseEvent& event)
|
||||
&& (wxGetApp().Game.IsHidden(x,y)
|
||||
|| wxGetApp().Game.GetRemainingCells()==0))
|
||||
{ wxGetApp().Game.Mark(x,y);
|
||||
Refresh(x, y, x, y);
|
||||
RefreshField(x, y, x, y);
|
||||
return;
|
||||
}
|
||||
else if (event.LeftDown() && wxGetApp().Game.IsHidden(x,y)
|
||||
|
@ -253,117 +253,117 @@ void Card::Draw(wxDC& dc, int x, int y)
|
||||
}
|
||||
|
||||
// Draw the value
|
||||
dc.Blit(x + m_scale*3, y + m_scale*3, valuewidth, valueheight,
|
||||
dc.Blit((wxCoord)(x + m_scale*3), (wxCoord)(y + m_scale*3), valuewidth, valueheight,
|
||||
&memoryDC, valuewidth * (m_pipValue - 1), valuepos, wxCOPY);
|
||||
dc.Blit(x + m_width - m_scale*3 - valuewidth, y + m_height - valueheight - m_scale*3,
|
||||
dc.Blit((wxCoord)(x + m_width - m_scale*3 - valuewidth), (wxCoord)(y + m_height - valueheight - m_scale*3),
|
||||
valuewidth, valueheight,
|
||||
&memoryDC, valuewidth * (m_pipValue - 1), valuepos+valueheight, wxCOPY);
|
||||
|
||||
// Draw the pips
|
||||
dc.Blit(x + m_scale*3 + valuewidth+2, y + m_scale*3, pipsize, pipsize,
|
||||
dc.Blit((wxCoord)(x + m_scale*3 + valuewidth+2), (wxCoord)(y + m_scale*3), pipsize, pipsize,
|
||||
&memoryDC, pipsize * m_suit, pippos, wxCOPY);
|
||||
dc.Blit(x + m_width - m_scale*3-valuewidth-pipsize-2, y + m_height - pipsize - m_scale*3,
|
||||
dc.Blit((wxCoord)(x + m_width - m_scale*3-valuewidth-pipsize-2), (wxCoord)(y + m_height - pipsize - m_scale*3),
|
||||
pipsize, pipsize,
|
||||
&memoryDC, pipsize * m_suit, pipsize+pippos, wxCOPY);
|
||||
|
||||
switch (m_pipValue)
|
||||
{
|
||||
case 1:
|
||||
dc.Blit(x - symdist + m_width / 2, y - m_scale*5 + m_height / 2, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 2), (wxCoord)(y - m_scale*5 + m_height / 2), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
dc.Blit(x - symdist + m_width / 2, y - symdist + m_height / 2, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 2), (wxCoord)(y - symdist + m_height / 2), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
case 2:
|
||||
dc.Blit(x - symdist + m_width / 2,
|
||||
y - symdist + m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 2),
|
||||
(wxCoord)(y - symdist + m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
dc.Blit(x - symdist + m_width / 2,
|
||||
y - symdist + 3 * m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 2),
|
||||
(wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
|
||||
break;
|
||||
|
||||
case 5:
|
||||
dc.Blit(x - symdist + m_width / 2, y - symdist + m_height / 2, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 2), (wxCoord)(y - symdist + m_height / 2), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
case 4:
|
||||
dc.Blit(x - symdist + m_width / 4,
|
||||
y - symdist + m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 4),
|
||||
(wxCoord)(y - symdist + m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
dc.Blit(x - symdist + m_width / 4,
|
||||
y - symdist + 3 * m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 4),
|
||||
(wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
|
||||
dc.Blit(x - symdist + 3 * m_width / 4,
|
||||
y - symdist + m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
|
||||
(wxCoord)(y - symdist + m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
dc.Blit(x - symdist + 3 * m_width / 4,
|
||||
y - symdist + 3 * m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
|
||||
(wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
|
||||
break;
|
||||
|
||||
case 8:
|
||||
dc.Blit(x - symdist + 5 * m_width / 10,
|
||||
y - symdist + 5 * m_height / 8, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + 5 * m_width / 10),
|
||||
(wxCoord)(y - symdist + 5 * m_height / 8), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
|
||||
case 7:
|
||||
dc.Blit(x - symdist + 5 * m_width / 10,
|
||||
y - symdist + 3 * m_height / 8, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + 5 * m_width / 10),
|
||||
(wxCoord)(y - symdist + 3 * m_height / 8), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
case 6:
|
||||
dc.Blit(x - symdist + m_width / 4,
|
||||
y - symdist + m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 4),
|
||||
(wxCoord)(y - symdist + m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
dc.Blit(x - symdist + m_width / 4,
|
||||
y - symdist + m_height / 2, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 4),
|
||||
(wxCoord)(y - symdist + m_height / 2), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
dc.Blit(x - symdist + m_width / 4,
|
||||
y - symdist + 3 * m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 4),
|
||||
(wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
|
||||
dc.Blit(x - symdist + 3 * m_width / 4,
|
||||
y - symdist + m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
|
||||
(wxCoord)(y - symdist + m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
dc.Blit(x - symdist + 3 * m_width / 4,
|
||||
y - symdist + m_height / 2, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
|
||||
(wxCoord)(y - symdist + m_height / 2), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
dc.Blit(x - symdist + 3 * m_width / 4,
|
||||
y - symdist + 3 * m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
|
||||
(wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
|
||||
break;
|
||||
|
||||
case 10:
|
||||
dc.Blit(x - symdist + m_width / 2,
|
||||
y - symdist + 2 * m_height / 3, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 2),
|
||||
(wxCoord)(y - symdist + 2 * m_height / 3), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
|
||||
case 9:
|
||||
dc.Blit(x - symdist + m_width / 4,
|
||||
y - symdist2 + m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 4),
|
||||
(wxCoord)(y - symdist2 + m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
dc.Blit(x - symdist + m_width / 4,
|
||||
y - symdist2 + 5 * m_height / 12, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 4),
|
||||
(wxCoord)(y - symdist2 + 5 * m_height / 12), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
dc.Blit(x - symdist + m_width / 4,
|
||||
y - symdist + 7 * m_height / 12, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 4),
|
||||
(wxCoord)(y - symdist + 7 * m_height / 12), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
|
||||
dc.Blit(x - symdist + m_width / 4,
|
||||
y - symdist + 3 * m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 4),
|
||||
(wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
|
||||
|
||||
dc.Blit(x - symdist + 3 * m_width / 4,
|
||||
y - symdist2 + m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
|
||||
(wxCoord)(y - symdist2 + m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
dc.Blit(x - symdist + 3 * m_width / 4,
|
||||
y - symdist2 + 5 * m_height / 12, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
|
||||
(wxCoord)(y - symdist2 + 5 * m_height / 12), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
dc.Blit(x - symdist + 3 * m_width / 4,
|
||||
y - symdist + 7 * m_height / 12, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
|
||||
(wxCoord)(y - symdist + 7 * m_height / 12), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
|
||||
dc.Blit(x - symdist + 3 * m_width / 4,
|
||||
y - symdist + 3 * m_height / 4, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + 3 * m_width / 4),
|
||||
(wxCoord)(y - symdist + 3 * m_height / 4), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
|
||||
dc.Blit(x - symdist + m_width / 2,
|
||||
y - symdist + m_height / 3, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x - symdist + m_width / 2),
|
||||
(wxCoord)(y - symdist + m_height / 3), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
break;
|
||||
case 11:
|
||||
@ -371,14 +371,14 @@ void Card::Draw(wxDC& dc, int x, int y)
|
||||
case 13:
|
||||
memoryDC.SelectObject(*m_pictureBmap);
|
||||
int picwidth = 40,picheight = 45;
|
||||
dc.Blit(x + (m_width-picwidth)/2, y - picheight/2 + m_height/2,
|
||||
dc.Blit((wxCoord)(x + (m_width-picwidth)/2), (wxCoord)(y - picheight/2 + m_height/2),
|
||||
picwidth, picheight,
|
||||
&memoryDC, picwidth * (m_pipValue - 11), 0, wxCOPY);
|
||||
|
||||
memoryDC.SelectObject(*m_symbolBmap);
|
||||
dc.Blit(x + m_width-(m_width-picwidth)/2-symsize-3,y - picheight/2+m_height/2+1, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x + m_width-(m_width-picwidth)/2-symsize-3),(wxCoord)(y - picheight/2+m_height/2+1), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos, wxCOPY);
|
||||
dc.Blit(x + (m_width-picwidth)/2+2,y + picheight/2 + m_height/2-symsize, symsize, symsize,
|
||||
dc.Blit((wxCoord)(x + (m_width-picwidth)/2+2),(wxCoord)(y + picheight/2 + m_height/2-symsize), symsize, symsize,
|
||||
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
|
||||
break;
|
||||
}
|
||||
|
@ -193,8 +193,8 @@ void Game::DoMove(wxDC& dc, Pile* src, Pile* dest)
|
||||
|
||||
if (frame)
|
||||
{
|
||||
wxNode *node = frame->GetChildren().First();
|
||||
if (node) canvas = (wxWindow*)node->Data();
|
||||
wxNode *node = (wxNode *)frame->GetChildren().GetFirst();
|
||||
if (node) canvas = (wxWindow*)node->GetData();
|
||||
}
|
||||
|
||||
// This game is over
|
||||
|
@ -88,7 +88,7 @@ void Pile::Redraw(wxDC& dc )
|
||||
{
|
||||
if (m_dx == 0 && m_dy == 0)
|
||||
{
|
||||
if ((canvas) && (canvas->IsExposed(m_x,m_y,Card::GetScale()*60,Card::GetScale()*200)))
|
||||
if ((canvas) && (canvas->IsExposed(m_x,m_y,(int)(Card::GetScale()*60),(int)(Card::GetScale()*200))))
|
||||
m_cards[m_topCard]->Draw(dc, m_x, m_y);
|
||||
}
|
||||
else
|
||||
@ -97,7 +97,7 @@ void Pile::Redraw(wxDC& dc )
|
||||
int y = m_y;
|
||||
for (int i = 0; i <= m_topCard; i++)
|
||||
{
|
||||
if ((canvas) && (canvas->IsExposed(x,y,Card::GetScale()*60,Card::GetScale()*200)))
|
||||
if ((canvas) && (canvas->IsExposed(x,y,(int)(Card::GetScale()*60),(int)(Card::GetScale()*200))))
|
||||
m_cards[i]->Draw(dc, x, y);
|
||||
x += (int)Card::GetScale()*m_dx;
|
||||
y += (int)Card::GetScale()*m_dy;
|
||||
@ -106,7 +106,7 @@ void Pile::Redraw(wxDC& dc )
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((canvas) && (canvas->IsExposed(m_x,m_y,Card::GetScale()*60,Card::GetScale()*200)))
|
||||
if ((canvas) && (canvas->IsExposed(m_x,m_y,(int)(Card::GetScale()*60),(int)(Card::GetScale()*200))))
|
||||
Card::DrawNullCard(dc, m_x, m_y);
|
||||
}
|
||||
}
|
||||
|
@ -147,7 +147,7 @@ const wxString& PlayerSelectionDialog::GetPlayersName()
|
||||
return m_player;
|
||||
}
|
||||
|
||||
void PlayerSelectionDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
void PlayerSelectionDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
||||
{
|
||||
m_player = _T("");
|
||||
EndModal(wxID_CANCEL);
|
||||
|
@ -174,7 +174,7 @@ void ScoreDialog::Display()
|
||||
Show(TRUE);
|
||||
}
|
||||
|
||||
void ScoreDialog::OnCloseWindow(wxCloseEvent& event)
|
||||
void ScoreDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
||||
{
|
||||
EndModal(wxID_OK);
|
||||
}
|
||||
|
@ -122,12 +122,12 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, cons
|
||||
}
|
||||
|
||||
// Intercept menu commands
|
||||
void MyFrame::OnExit(wxCommandEvent& event)
|
||||
void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
this->Destroy();
|
||||
}
|
||||
|
||||
void MyFrame::OnCloseWindow(wxCloseEvent& event)
|
||||
void MyFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
|
||||
{
|
||||
static bool destroyed = FALSE;
|
||||
if (destroyed)
|
||||
@ -159,7 +159,7 @@ MyCanvas::MyCanvas(wxFrame *frame):
|
||||
WaterBrush = wxBrush(wxCol4, wxSOLID);
|
||||
}
|
||||
|
||||
void MyCanvas::OnPaint(wxPaintEvent& event)
|
||||
void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
{
|
||||
wxPaintDC dc(this);
|
||||
Draw(dc);
|
||||
|
@ -809,7 +809,7 @@ void LifeCanvas::DrawChanged()
|
||||
}
|
||||
|
||||
// event handlers
|
||||
void LifeCanvas::OnPaint(wxPaintEvent& event)
|
||||
void LifeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
|
||||
{
|
||||
wxPaintDC dc(this);
|
||||
wxRect rect = GetUpdateRegion().GetBox();
|
||||
|
@ -608,7 +608,7 @@ bool MyApp::OnInit()
|
||||
// randomize();
|
||||
pages[0] = 0;
|
||||
|
||||
TheMainWindow = new MainWindow(NULL, 500, _T("wxPoem"), wxPoint(XPos, YPos), wxSize(100, 100), wxCAPTION|wxMINIMIZE_BOX|wxSYSTEM_MENU);
|
||||
TheMainWindow = new MainWindow(NULL, 500, _T("wxPoem"), wxPoint(XPos, YPos), wxSize(100, 100), wxCAPTION|wxMINIMIZE_BOX|wxSYSTEM_MENU|wxCLOSE_BOX);
|
||||
|
||||
#ifdef wx_x
|
||||
TheMainWindow->SetIcon(Icon(_T("wxpoem")));
|
||||
@ -775,7 +775,7 @@ void MyCanvas::OnMouseEvent(wxMouseEvent& event)
|
||||
// Process characters
|
||||
void MyCanvas::OnChar(wxKeyEvent& event)
|
||||
{
|
||||
switch (event.KeyCode())
|
||||
switch (event.GetKeyCode())
|
||||
{
|
||||
case 'n':
|
||||
case 'N':
|
||||
|
Loading…
Reference in New Issue
Block a user