- // Make a menu bar
- wxMenu* gameMenu = new wxMenu;
- gameMenu->Append(NEW_GAME, "&New", "Start a new game");
- gameMenu->Append(SCORES, "&Scores...", "Displays scores");
- gameMenu->Append(EXIT, "E&xit", "Exits Forty Thieves");
-
- wxMenu* editMenu = new wxMenu;
- editMenu->Append(UNDO, "&Undo", "Undo the last move");
- editMenu->Append(REDO, "&Redo", "Redo a move that has been undone");
-
- wxMenu* optionsMenu = new wxMenu;
- optionsMenu->Append(RIGHT_BUTTON_UNDO,
- "&Right button undo",
- "Enables/disables right mouse button undo and redo",
- TRUE
- );
- optionsMenu->Append(HELPING_HAND,
- "&Helping hand",
- "Enables/disables hand cursor when a card can be moved",
- TRUE
- );
- optionsMenu->Append(LARGE_CARDS,
- "&Large cards",
- "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(ABOUT, "&About...", "Displays information about the game");
-
- m_menuBar = new wxMenuBar;
- m_menuBar->Append(gameMenu, "&Game");
- m_menuBar->Append(editMenu, "&Edit");
- m_menuBar->Append(optionsMenu, "&Options");
- m_menuBar->Append(helpMenu, "&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);