X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/025e88c50bc838a02e352cdeb53918ebbec20aee..674ac8b919eecbc201b5f23b470a567cd0565e10:/samples/bombs/bombs1.cpp diff --git a/samples/bombs/bombs1.cpp b/samples/bombs/bombs1.cpp index 38ff757140..0b77417dcc 100644 --- a/samples/bombs/bombs1.cpp +++ b/samples/bombs/bombs1.cpp @@ -46,8 +46,6 @@ void BombsCanvasClass::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2) wxPen *blackPen = wxThePenList->FindOrCreatePen(*wxBlack, 1, wxSOLID); wxPen *redPen = wxThePenList->FindOrCreatePen(*wxRed, 1, wxSOLID); wxPen *bluePen = wxThePenList->FindOrCreatePen(*wxBlue, 1, wxSOLID); - wxPen *whitePen = wxThePenList->FindOrCreatePen(*wxWhite, 1, wxSOLID); - wxPen *greyPen = wxThePenList->FindOrCreatePen(*wxGrey, 1, wxSOLID); wxBrush *whiteBrush = wxTheBrushList->FindOrCreateBrush(*wxWhite, wxSOLID); wxBrush *greyBrush = wxTheBrushList->FindOrCreateBrush(*wxGrey, wxSOLID); wxBrush *redBrush = wxTheBrushList->FindOrCreateBrush(*wxRed, wxSOLID); @@ -168,8 +166,9 @@ void BombsCanvasClass::Refresh(int xc1, int yc1, int xc2, int yc2) // Called when the canvas receives a mouse event. void BombsCanvasClass::OnEvent(wxMouseEvent& event) -{ float fx, fy; - event.Position(&fx, &fy); +{ + wxCoord fx, fy; + event.GetPosition(&fx, &fy); int x = fx/(x_cell*X_UNIT); int y = fy/(y_cell*Y_UNIT); if (x