- // Make a menu bar
- wxMenu* gameMenu = new wxMenu;
- gameMenu->Append(NEW_GAME, _T("&New"), _T("Start a new game"));
- gameMenu->Append(SCORES, _T("&Scores..."), _T("Displays scores"));
- gameMenu->Append(wxID_EXIT, _T("E&xit"), _T("Exits Forty Thieves"));
-
- wxMenu* editMenu = new wxMenu;
- editMenu->Append(UNDO, _T("&Undo"), _T("Undo the last move"));
- editMenu->Append(REDO, _T("&Redo"), _T("Redo a move that has been undone"));
-
- wxMenu* optionsMenu = new wxMenu;
- optionsMenu->Append(RIGHT_BUTTON_UNDO,
- _T("&Right button undo"),
- _T("Enables/disables right mouse button undo and redo"),
- TRUE
- );
- optionsMenu->Append(HELPING_HAND,
- _T("&Helping hand"),
- _T("Enables/disables hand cursor when a card can be moved"),
- TRUE
- );
- optionsMenu->Append(LARGE_CARDS,
- _T("&Large cards"),
- _T("Enables/disables large cards for high resolution displays"),
- TRUE
- );
- optionsMenu->Check(HELPING_HAND, TRUE);
- optionsMenu->Check(RIGHT_BUTTON_UNDO, TRUE);
- optionsMenu->Check(LARGE_CARDS, largecards ? TRUE : FALSE);
-
- wxMenu* helpMenu = new wxMenu;
- helpMenu->Append(wxID_HELP_CONTENTS, _T("&Help Contents"), _T("Displays information about playing the game"));
- helpMenu->Append(wxID_ABOUT, _T("&About..."), _T("About Forty Thieves"));
-
- m_menuBar = new wxMenuBar;
- m_menuBar->Append(gameMenu, _T("&Game"));
- m_menuBar->Append(editMenu, _T("&Edit"));
- m_menuBar->Append(optionsMenu, _T("&Options"));
- m_menuBar->Append(helpMenu, _T("&Help"));
-
- SetMenuBar(m_menuBar);
-
- if (largecards)
- Card::SetScale(1.3);
-
- m_canvas = new FortyCanvas(this, 0, 0, 400, 400);
- wxLayoutConstraints* constr = new wxLayoutConstraints;
- constr->left.SameAs(this, wxLeft);
- constr->top.SameAs(this, wxTop);
- constr->right.SameAs(this, wxRight);
- constr->height.SameAs(this, wxHeight);
- m_canvas->SetConstraints(constr);
-
- CreateStatusBar();
-}
+ // Make a menu bar
+ wxMenu* gameMenu = new wxMenu;
+ gameMenu->Append(wxID_NEW, wxGetStockLabel(wxID_NEW), wxT("Start a new game"));
+ gameMenu->Append(SCORES, wxT("&Scores..."), wxT("Displays scores"));
+ gameMenu->Append(wxID_EXIT, wxGetStockLabel(wxID_EXIT), wxT("Exits Forty Thieves"));
+
+ wxMenu* editMenu = new wxMenu;
+ editMenu->Append(wxID_UNDO, wxGetStockLabel(wxID_UNDO), wxT("Undo the last move"));
+ editMenu->Append(wxID_REDO, wxGetStockLabel(wxID_REDO), wxT("Redo a move that has been undone"));
+
+ wxMenu* optionsMenu = new wxMenu;
+ optionsMenu->Append(RIGHT_BUTTON_UNDO,
+ wxT("&Right button undo"),
+ wxT("Enables/disables right mouse button undo and redo"),
+ true
+ );
+ optionsMenu->Append(HELPING_HAND,
+ wxT("&Helping hand"),
+ wxT("Enables/disables hand cursor when a card can be moved"),
+ true
+ );
+ optionsMenu->Append(LARGE_CARDS,
+ wxT("&Large cards"),
+ wxT("Enables/disables large cards for high resolution displays"),
+ true
+ );
+ optionsMenu->Check(HELPING_HAND, true);
+ optionsMenu->Check(RIGHT_BUTTON_UNDO, true);
+ optionsMenu->Check(LARGE_CARDS, largecards ? true : false);