- Timestamp:
- 21/02/08 18:58:18 (5 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
-
MainFrame.cpp (modified) (8 diffs)
-
ObjectsID.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MainFrame.cpp
r140 r151 1 // $Header$2 1 /*************************************************************************** 3 2 * Copyright (C) 2006-2008 by Guy Rutenberg * … … 100 99 101 100 //disable the undo button 102 (GetMenuBar()->FindItem( ID_UNDO))->Enable(false);101 (GetMenuBar()->FindItem(wxID_UNDO))->Enable(false); 103 102 104 103 ConnectEventTable(); … … 132 131 133 132 //insert menu items into menu Game 134 gameMenu->Append(ID_NEWGAME,wxT("&New Game\tF2"),wxT("Start a new game")); 135 //create the undo button and make it disabled 136 gameMenu->Append(ID_UNDO,wxT("&Undo\tCTRL+Z"),wxT("Undo the last move")); 133 gameMenu->Append(wxID_NEW,wxT("&New Game\tF2"),wxT("Start a new game")); 134 gameMenu->Append(wxID_UNDO,wxT("&Undo\tCTRL+Z"),wxT("Undo the last move")); 137 135 gameMenu->Append(ID_SHOWHIGHSCORE,wxT("High &Scores"),wxT("Show high-scores table")); 138 136 gameMenu->Append(ID_SETTINGS,wxT("Settings"),wxT("Show settings dialog")); 139 137 gameMenu->Append(ID_THEMES,wxT("Dice Theme..."),wxT("Select a dice theme")); 140 gameMenu->Append(wxID_EXIT, wxT("E&xit\tAlt-X"), 141 wxT("Quit this program")); 138 gameMenu->Append(wxID_EXIT); 142 139 143 140 // Declare the menu-bar and append the freshly created menus to the menu bar... … … 331 328 Connect(ID_CHECK_FOR_UPDATES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnCheckForUpdates)); 332 329 Connect(ID_SENDCOMMENT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnSendComment)); 333 Connect( ID_NEWGAME, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnNewGame));334 Connect( ID_UNDO, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnUndo));330 Connect(wxID_NEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnNewGame)); 331 Connect(wxID_UNDO, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnUndo)); 335 332 Connect(ID_SHOWHIGHSCORE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnShowHighscore)); 336 333 Connect(ID_SETTINGS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnSettings)); … … 424 421 { 425 422 //disable the undo button so it won't be enabled when a new game is started. 426 (GetMenuBar()->FindItem( ID_UNDO))->Enable(false);423 (GetMenuBar()->FindItem(wxID_UNDO))->Enable(false); 427 424 428 425 ResetRolls(); … … 483 480 CalculateSubTotal(); 484 481 485 (GetMenuBar()->FindItem( ID_UNDO))->Enable(false);482 (GetMenuBar()->FindItem(wxID_UNDO))->Enable(false); 486 483 //cancel the counting for the choice that was canceled 487 484 m_numofplaysleft++; … … 495 492 { 496 493 if (m_numofplaysleft) { 497 (GetMenuBar()->FindItem( ID_UNDO))->Enable(true);494 (GetMenuBar()->FindItem(wxID_UNDO))->Enable(true); 498 495 m_lastmove = id; 499 496 } … … 664 661 665 662 //we rolled the dices so undoing isn't allowed 666 (GetMenuBar()->FindItem( ID_UNDO))->Enable(false);663 (GetMenuBar()->FindItem(wxID_UNDO))->Enable(false); 667 664 m_yahtzeebonus = false; //if we scored yahtzee bonus before we don't care anymore. 668 665 -
trunk/src/ObjectsID.h
r137 r151 24 24 enum { 25 25 ID_PANEL, 26 ID_NEWGAME,27 ID_UNDO,28 26 ID_SHOWHIGHSCORE, 29 27 ID_SETTINGS,
Note: See TracChangeset
for help on using the changeset viewer.
