Changeset 20
- Timestamp:
- 12/17/2006 11:42:56 AM (5 years ago)
- Location:
- trunk/OpenYahtzee
- Files:
-
- 7 edited
-
Doxyfile (modified) (5 diffs)
-
openyahtzee.kdevelop (modified) (4 diffs)
-
openyahtzee.kdevelop.pcs (modified) (previous)
-
openyahtzee.kdevses (modified) (1 diff)
-
src/MainFrame.cpp (modified) (6 diffs)
-
src/MainFrame.h (modified) (5 diffs)
-
src/ObjectsID.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/OpenYahtzee/Doxyfile
r2 r20 4 4 # Project related configuration options 5 5 #--------------------------------------------------------------------------- 6 PROJECT_NAME = openyahtzee.kdevelop7 PROJECT_NUMBER = 0.18 OUTPUT_DIRECTORY = 6 PROJECT_NAME = OpenYahtzee 7 PROJECT_NUMBER = cvs 8 OUTPUT_DIRECTORY = /home/guy/workspace/OpenYahtzee 9 9 CREATE_SUBDIRS = NO 10 10 OUTPUT_LANGUAGE = English … … 81 81 # configuration options related to the input files 82 82 #--------------------------------------------------------------------------- 83 INPUT = /home/guy/workspace/ openyahtzee83 INPUT = /home/guy/workspace/OpenYahtzee 84 84 FILE_PATTERNS = *.c \ 85 85 *.cc \ … … 128 128 *.xpm \ 129 129 *.dox 130 RECURSIVE = yes 131 EXCLUDE = 130 RECURSIVE = YES 131 EXCLUDE = /home/guy/workspace/OpenYahtzee/optimized \ 132 /home/guy/workspace/OpenYahtzee/debug 132 133 EXCLUDE_SYMLINKS = NO 133 134 EXCLUDE_PATTERNS = … … 151 152 # configuration options related to the alphabetical class index 152 153 #--------------------------------------------------------------------------- 153 ALPHABETICAL_INDEX = NO154 ALPHABETICAL_INDEX = YES 154 155 COLS_IN_ALPHA_INDEX = 5 155 156 IGNORE_PREFIX = … … 208 209 # configuration options related to the XML output 209 210 #--------------------------------------------------------------------------- 210 GENERATE_XML = yes211 GENERATE_XML = YES 211 212 XML_OUTPUT = xml 212 213 XML_SCHEMA = -
trunk/OpenYahtzee/openyahtzee.kdevelop
r17 r20 29 29 </runarguments> 30 30 <customdirectory>/</customdirectory> 31 <programargs ></programargs>31 <programargs/> 32 32 <autocompile>true</autocompile> 33 33 <envvars/> … … 78 78 <numberofjobs>1</numberofjobs> 79 79 <dontact>false</dontact> 80 <makebin ></makebin>80 <makebin/> 81 81 <prio>0</prio> 82 82 </make> … … 221 221 <custom>false</custom> 222 222 <bzip>false</bzip> 223 <archname ></archname>223 <archname/> 224 224 <appname>OpenYahtzee</appname> 225 225 <version>1.5.1</version> 226 <release ></release>226 <release/> 227 227 <vendor>Guy Rutenberg</vendor> 228 228 <licence>GPL</licence> 229 <summary ></summary>230 <group ></group>231 <packager ></packager>232 <description ></description>233 <changelog ></changelog>229 <summary/> 230 <group/> 231 <packager/> 232 <description/> 233 <changelog/> 234 234 <devpackage>false</devpackage> 235 235 <docspackage>false</docspackage> … … 240 240 <ftpkde>false</ftpkde> 241 241 <appskde>false</appskde> 242 <url ></url>242 <url/> 243 243 </dist> 244 244 </kdevelop> -
trunk/OpenYahtzee/openyahtzee.kdevses
r17 r20 2 2 <!DOCTYPE KDevPrjSession> 3 3 <KDevPrjSession> 4 <DocsAndViews NumberOfDocuments=" 1" >4 <DocsAndViews NumberOfDocuments="7" > 5 5 <Doc0 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/SettingsDB.h" > 6 <View0 line=" 3" Type="Source" />6 <View0 line="23" Type="Source" /> 7 7 </Doc0> 8 <Doc1 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/openyahtzee.cpp" > 9 <View0 line="0" Type="Source" /> 10 </Doc1> 11 <Doc2 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/MainFrame.cpp" > 12 <View0 line="86" Type="Source" /> 13 </Doc2> 14 <Doc3 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/ObjectsID.h" > 15 <View0 line="44" Type="Source" /> 16 </Doc3> 17 <Doc4 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/MainFrame.h" > 18 <View0 line="80" Type="Source" /> 19 </Doc4> 20 <Doc5 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/DBwrapper.h" > 21 <View0 line="26" Type="Source" /> 22 </Doc5> 23 <Doc6 NumberOfViews="1" URL="file:///usr/include/wx-2.6/wx/gtk/bitmap.h" > 24 <View0 line="74" Type="Source" /> 25 </Doc6> 8 26 </DocsAndViews> 9 27 <pluginList> 10 28 <kdevdebugger> 11 29 <breakpointList> 12 <breakpoint0 location="/home/guy/workspace/OpenYahtzee/src/MainFrame.cpp:22 4" type="1" tracingFormatString="" traceFormatStringEnabled="0" condition="" tracingEnabled="0" enabled="1" >30 <breakpoint0 location="/home/guy/workspace/OpenYahtzee/src/MainFrame.cpp:228" type="1" tracingFormatString="" traceFormatStringEnabled="0" condition="" tracingEnabled="0" enabled="1" > 13 31 <tracedExpressions/> 14 32 </breakpoint0> 33 <breakpoint1 location="/home/guy/workspace/OpenYahtzee/src/MainFrame.cpp:215" type="1" tracingFormatString="" traceFormatStringEnabled="0" condition="" tracingEnabled="0" enabled="1" > 34 <tracedExpressions/> 35 </breakpoint1> 15 36 </breakpointList> 16 37 </kdevdebugger> -
trunk/OpenYahtzee/src/MainFrame.cpp
r17 r20 73 73 wxMenu *helpMenu = new wxMenu; //create Help menu 74 74 75 75 76 //insert menu items into menu Help 76 77 helpMenu->Append(wxID_ABOUT, wxT("&About...\tF1"), … … 79 80 //insert menu items into menu File 80 81 gameMenu->Append(ID_NEWGAME,wxT("&New Game\tF2"),wxT("Start a new game")); 82 //create the undo button and make it disabled 83 (gameMenu->Append(ID_UNDO,wxT("&Undo"),wxT("Undo the last move")))->Enable(false); 81 84 gameMenu->Append(ID_SHOWHIGHSCORE,wxT("High &Scores"),wxT("Show high-scores table")); 82 85 gameMenu->Append(ID_SETTINGS,wxT("Settings"),wxT("Show settings dialog")); 83 86 gameMenu->Append(wxID_EXIT, wxT("E&xit\tAlt-X"), 84 87 wxT("Quit this program")); 85 86 88 87 89 // Declare the menu-bar and append the freshly created menus to the menu bar... 88 90 wxMenuBar *menuBar = new wxMenuBar(); 89 91 menuBar->Append(gameMenu, wxT("&Game")); 90 91 92 menuBar->Append(helpMenu, wxT("&Help")); 92 93 … … 193 194 Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnAbout)); 194 195 Connect(ID_NEWGAME, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnNewGame)); 196 Connect(ID_UNDO, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnUndo)); 195 197 Connect(ID_SHOWHIGHSCORE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnShowHighscore)); 196 198 Connect(ID_SETTINGS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnSettings)); … … 214 216 m_numofplaysleft = 13; 215 217 216 217 218 218 } 219 219 … … 249 249 for (int i = ID_ACES; i<= ID_CHANCE; i++) 250 250 ((wxButton*) FindWindow(i))->Enable(true); 251 } 252 253 ///This function handles the undo events 254 void MainFrame::OnUndo(wxCommandEvent& event) 255 { 256 std::cout<<"in undo"<<std::endl; 257 m_rolls = m_rollsundo; 258 259 //enable the roll button if neccessary 260 if (m_rolls > 0) //we still have remaining rolls 261 ((wxButton*) FindWindow(ID_ROLL)) -> Enable(true); 262 263 //reset the users last choice 264 FindWindow(m_lastmove)->Enable(true); 265 //clear the score; 266 ((wxTextCtrl*)FindWindow(ID_ACESTEXT + (m_lastmove - ID_ACES)))->SetValue(wxT("")); 267 FindWindow(ID_UNDO)->Enable(false); 268 m_numofplaysleft--; 269 } 270 ///This function enables the undo button and stores the last move 271 inline void MainFrame::EnableUndo(int id) 272 { 273 FindWindow(ID_UNDO)->Enable(true); 274 m_lastmove = id; 251 275 } 252 276 … … 531 555 void MainFrame::ResetRolls() 532 556 { 557 m_rollsundo = m_rolls; 533 558 m_rolls = 3; 534 559 ((wxButton*) FindWindow(ID_ROLL)) -> Enable(true); -
trunk/OpenYahtzee/src/MainFrame.h
r17 r20 19 19 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 20 20 ***************************************************************************/ 21 /**\file MainFrame.h 22 *\brief Header file for MainFrame class. 23 * 24 * This File contains the declaration of the class MainFrame 25 */ 21 26 22 /***********************************************23 * This File contains the declaration *24 * of the class MainFrame *25 ***********************************************/26 27 #include "SettingsDB.h" 27 28 #include "HighScoreTableDB.h" … … 29 30 #define MAINFRAME_INC 30 31 31 // Declare our main frame class 32 /// MainFrame class - the main window 33 /** 34 The Main Frame class is a derieved class from wxFrame which is responsible to 35 the main window of the application. This class also hold all the functions 36 that process the dice and handles the gameplay. This function are called as 37 event handlers. 38 */ 32 39 class MainFrame : public wxFrame 33 40 { … … 40 47 void OnAbout(wxCommandEvent& event); 41 48 void OnNewGame (wxCommandEvent& event); 49 void OnUndo (wxCommandEvent& event); 42 50 void OnShowHighscore (wxCommandEvent& event); 43 51 void OnSettings (wxCommandEvent& event); … … 61 69 void EndofGame(); 62 70 void HighScoreHandler(int score); 71 inline void EnableUndo(int id); 63 72 64 73 //pointers to hold bitmap data for the dices … … 71 80 bool m_yahtzee; 72 81 73 SettingsDB *m_settingsdb; ///handles the settings database 74 HighScoreTableDB *m_highscoredb; ///handles the highscore database managment 82 short int m_lastmove; //stores the ID of the last button pressed. 83 short int m_rollsundo; //holds the number of remaining rolls for use with the undo option 84 85 SettingsDB *m_settingsdb; //handles the settings database 86 HighScoreTableDB *m_highscoredb; //handles the highscore database managment 75 87 76 88 }; -
trunk/OpenYahtzee/src/ObjectsID.h
r17 r20 25 25 ID_PANEL, 26 26 ID_NEWGAME, 27 ID_UNDO, 27 28 ID_SHOWHIGHSCORE, 28 29 ID_SETTINGS,
Note: See TracChangeset
for help on using the changeset viewer.
