git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23668
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
level=IDM_EASY;
BombsFrame =
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;
int xmax=BombsFrame->BombsCanvas->field_width*BombsFrame->BombsCanvas->x_cell*X_UNIT;
int ymax=BombsFrame->BombsCanvas->field_height*BombsFrame->BombsCanvas->y_cell*Y_UNIT;
-void BombsFrameClass::OnCloseWindow(wxCloseEvent& event)
+void BombsFrameClass::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
-void BombsFrameClass::OnExit(wxCommandEvent& event)
+void BombsFrameClass::OnExit(wxCommandEvent& WXUNUSED(event))
-void BombsFrameClass::OnRestart(wxCommandEvent& event)
+void BombsFrameClass::OnRestart(wxCommandEvent& WXUNUSED(event))
{
BombsCanvas->UpdateFieldSize();
int xmax=BombsCanvas->field_width*BombsCanvas->x_cell*X_UNIT;
{
BombsCanvas->UpdateFieldSize();
int xmax=BombsCanvas->field_width*BombsCanvas->x_cell*X_UNIT;
wxGetApp().BombsFrame->SetClientSize(xmax, ymax);
}
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"));
}
{
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);
}
{
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);
}
{
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;
{
menuBar->Check(wxGetApp().level, FALSE);
wxGetApp().level=IDM_DIFFICULT;
dc.SetMapMode(wxMM_METRIC);
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)
// To have a square cell, there must be :
// sx*ycm == sy*xcm
if (chw*ycm < chh*xcm)
}
// Called when canvas needs to be repainted.
}
// Called when canvas needs to be repainted.
-void BombsCanvasClass::OnPaint(wxPaintEvent& event)
+void BombsCanvasClass::OnPaint(wxPaintEvent& WXUNUSED(event))
void OnPaint(wxPaintEvent& event);
void DrawField(wxDC *, int xc1, int yc1, int xc2, int yc2);
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();
void Uncover(int x, int y);
void OnEvent(wxMouseEvent& event);
void UpdateFieldSize();
-/*-------- 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. */
/*---------------------------------------------------------------------*/
/* 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);
{
wxClientDC dc(this);
DrawField(& dc, xc1, yc1, xc2, yc2);
void BombsCanvasClass::Uncover(int x, int y)
{
wxGetApp().Game.Unhide(x,y);
void BombsCanvasClass::Uncover(int x, int y)
{
wxGetApp().Game.Unhide(x,y);
+ RefreshField(x, y, x, y);
if (wxGetApp().Game.IsBomb(x,y) || wxGetApp().Game.GetRemainingCells()==0)
{ wxBell();
if (!wxGetApp().Game.IsBomb(x,y))
if (wxGetApp().Game.IsBomb(x,y) || wxGetApp().Game.GetRemainingCells()==0)
{ wxBell();
if (!wxGetApp().Game.IsBomb(x,y))
for(x=0; x<field_width; x++)
for(y=0; y<field_height; y++)
wxGetApp().Game.Unhide(x,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;
}
else if (!wxGetApp().Game.Get(x, y))
{ int left = ( x > 0 ) ? x-1 : 0;
&& (wxGetApp().Game.IsHidden(x,y)
|| wxGetApp().Game.GetRemainingCells()==0))
{ wxGetApp().Game.Mark(x,y);
&& (wxGetApp().Game.IsHidden(x,y)
|| wxGetApp().Game.GetRemainingCells()==0))
{ wxGetApp().Game.Mark(x,y);
+ RefreshField(x, y, x, y);
return;
}
else if (event.LeftDown() && wxGetApp().Game.IsHidden(x,y)
return;
}
else if (event.LeftDown() && wxGetApp().Game.IsHidden(x,y)
- 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);
&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
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);
&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:
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:
&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:
&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);
&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:
&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:
&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);
&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);
&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);
&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:
&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:
&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:
&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);
&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);
&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);
&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);
&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);
&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:
&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:
&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);
&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);
&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);
&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);
&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);
&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);
&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);
&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);
&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:
&memoryDC, symsize * m_suit, sympos, wxCOPY);
break;
case 11:
case 13:
memoryDC.SelectObject(*m_pictureBmap);
int picwidth = 40,picheight = 45;
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);
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);
&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;
}
&memoryDC, symsize * m_suit, sympos2, wxCOPY);
break;
}
- wxNode *node = frame->GetChildren().First();
- if (node) canvas = (wxWindow*)node->Data();
+ wxNode *node = (wxNode *)frame->GetChildren().GetFirst();
+ if (node) canvas = (wxWindow*)node->GetData();
{
if (m_dx == 0 && m_dy == 0)
{
{
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
m_cards[m_topCard]->Draw(dc, m_x, m_y);
}
else
int y = m_y;
for (int i = 0; i <= m_topCard; i++)
{
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;
m_cards[i]->Draw(dc, x, y);
x += (int)Card::GetScale()*m_dx;
y += (int)Card::GetScale()*m_dy;
- 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);
}
}
Card::DrawNullCard(dc, m_x, m_y);
}
}
-void PlayerSelectionDialog::OnCloseWindow(wxCloseEvent& event)
+void PlayerSelectionDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
{
m_player = _T("");
EndModal(wxID_CANCEL);
{
m_player = _T("");
EndModal(wxID_CANCEL);
-void ScoreDialog::OnCloseWindow(wxCloseEvent& event)
+void ScoreDialog::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
}
// Intercept menu commands
}
// Intercept menu commands
-void MyFrame::OnExit(wxCommandEvent& event)
+void MyFrame::OnExit(wxCommandEvent& WXUNUSED(event))
-void MyFrame::OnCloseWindow(wxCloseEvent& event)
+void MyFrame::OnCloseWindow(wxCloseEvent& WXUNUSED(event))
{
static bool destroyed = FALSE;
if (destroyed)
{
static bool destroyed = FALSE;
if (destroyed)
WaterBrush = wxBrush(wxCol4, wxSOLID);
}
WaterBrush = wxBrush(wxCol4, wxSOLID);
}
-void MyCanvas::OnPaint(wxPaintEvent& event)
+void MyCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc(this);
Draw(dc);
{
wxPaintDC dc(this);
Draw(dc);
-void LifeCanvas::OnPaint(wxPaintEvent& event)
+void LifeCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc(this);
wxRect rect = GetUpdateRegion().GetBox();
{
wxPaintDC dc(this);
wxRect rect = GetUpdateRegion().GetBox();
// randomize();
pages[0] = 0;
// 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")));
#ifdef wx_x
TheMainWindow->SetIcon(Icon(_T("wxpoem")));
// Process characters
void MyCanvas::OnChar(wxKeyEvent& event)
{
// Process characters
void MyCanvas::OnChar(wxKeyEvent& event)
{
- switch (event.KeyCode())
+ switch (event.GetKeyCode())