Enhanced stock labels usage. Source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31675 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -23,6 +23,8 @@
|
|||||||
# include "wx/wx.h"
|
# include "wx/wx.h"
|
||||||
#endif //precompiled headers
|
#endif //precompiled headers
|
||||||
|
|
||||||
|
#include "wx/stockitem.h"
|
||||||
|
|
||||||
#include "bombs.h"
|
#include "bombs.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -90,7 +92,7 @@ BombsFrame::BombsFrame(BombsGame *game)
|
|||||||
menuLevel, wxT("Starts a new game"));
|
menuLevel, wxT("Starts a new game"));
|
||||||
|
|
||||||
menuFile->AppendSeparator();
|
menuFile->AppendSeparator();
|
||||||
menuFile->Append(wxID_EXIT, wxT("E&xit"), wxT("Quits the application"));
|
menuFile->Append(wxID_EXIT, wxGetStockLabel(wxID_EXIT), wxT("Quits the application"));
|
||||||
|
|
||||||
menuBar->Append(menuFile, wxT("&File"));
|
menuBar->Append(menuFile, wxT("&File"));
|
||||||
|
|
||||||
|
@@ -66,7 +66,7 @@ void BombsCanvas::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2)
|
|||||||
|
|
||||||
|
|
||||||
wxFont font= BOMBS_FONT;
|
wxFont font= BOMBS_FONT;
|
||||||
dc->SetFont(font);
|
dc->SetFont(font);
|
||||||
|
|
||||||
for(x=xc1; x<=xc2; x++)
|
for(x=xc1; x<=xc2; x++)
|
||||||
for(y=yc1; y<=yc2; y++)
|
for(y=yc1; y<=yc2; y++)
|
||||||
@@ -153,7 +153,7 @@ void BombsCanvas::DrawField(wxDC *dc, int xc1, int yc1, int xc2, int yc2)
|
|||||||
buf = wxT("0");
|
buf = wxT("0");
|
||||||
dc->SetTextForeground(wxGreen);
|
dc->SetTextForeground(wxGreen);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
buf = wxT("1");
|
buf = wxT("1");
|
||||||
dc->SetTextForeground(wxBlue);
|
dc->SetTextForeground(wxBlue);
|
||||||
break;
|
break;
|
||||||
@@ -263,7 +263,7 @@ void BombsCanvas::OnMouseEvent(wxMouseEvent& event)
|
|||||||
if ( (event.RightDown() || (event.LeftDown() && event.ShiftDown()))
|
if ( (event.RightDown() || (event.LeftDown() && event.ShiftDown()))
|
||||||
&& (m_game->IsHidden(x,y)
|
&& (m_game->IsHidden(x,y)
|
||||||
|| !m_game->GetNumRemainingCells() ) )
|
|| !m_game->GetNumRemainingCells() ) )
|
||||||
{
|
{
|
||||||
// store previous and current field
|
// store previous and current field
|
||||||
int prevFocusX = m_game->m_gridFocusX;
|
int prevFocusX = m_game->m_gridFocusX;
|
||||||
int prevFocusY = m_game->m_gridFocusY;
|
int prevFocusY = m_game->m_gridFocusY;
|
||||||
|
Reference in New Issue
Block a user