Changeset 65
- Timestamp:
- 28/03/07 11:36:14 (6 years ago)
- Location:
- trunk/OpenYahtzee
- Files:
-
- 9 edited
-
openyahtzee.kdevelop (modified) (2 diffs)
-
openyahtzee.kdevelop.pcs (modified) (previous)
-
openyahtzee.kdevses (modified) (3 diffs)
-
src/MainFrame.cpp (modified) (4 diffs)
-
src/MainFrame.h (modified) (1 diff)
-
src/Makefile.am (modified) (1 diff)
-
src/Makefile.in (modified) (3 diffs)
-
src/wxDynamicBitmap.cpp (modified) (3 diffs)
-
src/wxDynamicBitmap.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/OpenYahtzee/openyahtzee.kdevelop
r62 r65 223 223 <custom>false</custom> 224 224 <bzip>false</bzip> 225 <archname ></archname>225 <archname/> 226 226 <appname>OpenYahtzee</appname> 227 227 <version>1.7</version> 228 <release ></release>228 <release/> 229 229 <vendor>Guy Rutenberg</vendor> 230 230 <licence>GPL</licence> 231 <summary ></summary>232 <group ></group>233 <packager ></packager>234 <description ></description>235 <changelog ></changelog>231 <summary/> 232 <group/> 233 <packager/> 234 <description/> 235 <changelog/> 236 236 <devpackage>false</devpackage> 237 237 <docspackage>false</docspackage> … … 242 242 <ftpkde>false</ftpkde> 243 243 <appskde>false</appskde> 244 <url ></url>244 <url/> 245 245 </dist> 246 246 </kdevelop> -
trunk/OpenYahtzee/openyahtzee.kdevses
r62 r65 2 2 <!DOCTYPE KDevPrjSession> 3 3 <KDevPrjSession> 4 <DocsAndViews NumberOfDocuments=" 16" >4 <DocsAndViews NumberOfDocuments="7" > 5 5 <Doc0 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/SettingsDB.h" > 6 6 <View0 Type="Source" /> … … 10 10 </Doc1> 11 11 <Doc2 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/MainFrame.cpp" > 12 <View0 Type="Source" />12 <View0 line="641" Type="Source" /> 13 13 </Doc2> 14 14 <Doc3 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/ObjectsID.h" > 15 <View0 Type="Source" />15 <View0 line="74" Type="Source" /> 16 16 </Doc3> 17 17 <Doc4 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/MainFrame.h" > 18 <View0 Type="Source" />18 <View0 line="63" Type="Source" /> 19 19 </Doc4> 20 <Doc5 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/ DBwrapper.h" >21 <View0 Type="Source" />20 <Doc5 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/wxDynamicBitmap.cpp" > 21 <View0 line="80" Type="Source" /> 22 22 </Doc5> 23 <Doc6 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/ HighScoreTableDB.cpp" >24 <View0 Type="Source" />23 <Doc6 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/wxDynamicBitmap.h" > 24 <View0 line="52" Type="Source" /> 25 25 </Doc6> 26 <Doc7 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/SettingsDialog.cpp" >27 <View0 Type="Source" />28 </Doc7>29 <Doc8 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/SettingsDB.cpp" >30 <View0 Type="Source" />31 </Doc8>32 <Doc9 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/HighScoreTableDB.h" >33 <View0 Type="Source" />34 </Doc9>35 <Doc10 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/HighScoreDialog.cpp" >36 <View0 Type="Source" />37 </Doc10>38 <Doc11 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/SettingsDialog.h" >39 <View0 Type="Source" />40 </Doc11>41 <Doc12 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/wxDynamicBitmap.cpp" >42 <View0 Type="Source" />43 </Doc12>44 <Doc13 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/DBwrapper.cpp" >45 <View0 Type="Source" />46 </Doc13>47 <Doc14 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/wxDynamicBitmap.h" >48 <View0 Type="Source" />49 </Doc14>50 <Doc15 NumberOfViews="1" URL="file:///home/guy/workspace/OpenYahtzee/src/openyahtzee.rc" >51 <View0 line="0" Type="Source" />52 </Doc15>53 26 </DocsAndViews> 54 27 <pluginList> … … 57 30 </kdevdebugger> 58 31 <kdevbookmarks> 59 <bookmarks> 60 <bookmark url="/home/guy/workspace/OpenYahtzee/src/MainFrame.cpp" > 61 <mark line="108" /> 62 </bookmark> 63 </bookmarks> 32 <bookmarks/> 64 33 </kdevbookmarks> 65 34 <kdevvalgrind> 66 35 <executable path="" params="" /> 67 <valgrind path=" " params="" />68 <calltree path=" " params="" />69 <kcachegrind path=" " />36 <valgrind path="/usr/bin/valgrind" params="--tool=memcheck --tool=memcheck --leak-check=yes" /> 37 <calltree path="calltree" params="" /> 38 <kcachegrind path="kcachegrind" /> 70 39 </kdevvalgrind> 71 40 </pluginList> -
trunk/OpenYahtzee/src/MainFrame.cpp
r59 r65 34 34 #include "HighScoreDialog.h" 35 35 #include "SettingsDialog.h" 36 #include "About.h" 36 37 #include <iostream> 37 38 #include <sstream> … … 260 261 Connect(ID_YAHTZEE, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (MainFrame::OnYahtzeeButton)); 261 262 Connect(ID_CHANCE, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (MainFrame::OnChanceButton)); 263 Connect(ID_DICE1,ID_DICE5, wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler (MainFrame::OnDiceClick)); 262 264 263 265 /*** End of Event Table ***/ … … 276 278 void MainFrame::OnAbout(wxCommandEvent& event) 277 279 { 278 wxString msg; 279 wxString sqliteversion = wxString(sqlite3_version,wxConvUTF8); 280 msg.Printf(wxT("Open Yahtzee %s\nCopyright (C) 2006 by Guy Rutenberg.\nDice design by Seamus McGill\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n\nOpen Yahtzee was built against:\nwxWidgets %i.%i\n"),wxT(OY_VERSION),wxMAJOR_VERSION,wxMINOR_VERSION); 281 msg += wxT("SQLite ") + sqliteversion; 282 283 wxMessageBox(msg, wxT("About Open Yahtzee"), wxOK | wxICON_INFORMATION, this); 280 AboutDialog *about = new AboutDialog(this,wxID_ANY,wxT("About Open Yahtzee")); 281 about->ShowModal(); 284 282 } 285 283 … … 639 637 wxMessageBox(wxT("First you need to roll, and after you roll you may score"), wxT("OpenYahtzee"), wxOK | wxICON_INFORMATION, this); 640 638 639 } 640 641 void MainFrame::OnDiceClick (wxCommandEvent& event) 642 { 643 if (((wxCheckBox*) FindWindow(event.GetId()-ID_DICE1 + ID_DICE1KEEP))->IsEnabled()){ 644 bool newvalue = (((wxCheckBox*) FindWindow(event.GetId()-ID_DICE1 + ID_DICE1KEEP))->GetValue())?false:true; 645 ((wxCheckBox*) FindWindow(event.GetId()-ID_DICE1 + ID_DICE1KEEP)) -> SetValue(newvalue); 646 } 641 647 } 642 648 -
trunk/OpenYahtzee/src/MainFrame.h
r58 r65 62 62 void OnYahtzeeButton (wxCommandEvent& event); 63 63 void OnChanceButton (wxCommandEvent& event); 64 void OnDiceClick (wxCommandEvent& event); 64 65 65 66 -
trunk/OpenYahtzee/src/Makefile.am
r47 r65 1 1 bin_PROGRAMS = openyahtzee 2 2 openyahtzee_SOURCES = openyahtzee.cpp MainFrame.cpp five.xpm four.xpm one.xpm \ 3 six.xpm three.xpm two.xpm DBwrapper.cpp DBwrapper.h SettingsDB.cpp \4 HighScoreTableDB.cpp HighScoreDialog.cpp SettingsDialog.cpp icon.xpm icon32.xpm \5 openyahtzee.rc wxDynamicBitmap.cpp3 six.xpm three.xpm two.xpm DBwrapper.cpp DBwrapper.h SettingsDB.cpp \ 4 HighScoreTableDB.cpp HighScoreDialog.cpp SettingsDialog.cpp icon.xpm icon32.xpm \ 5 openyahtzee.rc wxDynamicBitmap.cpp About.cpp 6 6 7 7 # set the include path found by configure -
trunk/OpenYahtzee/src/Makefile.in
r47 r65 55 55 DBwrapper.$(OBJEXT) SettingsDB.$(OBJEXT) \ 56 56 HighScoreTableDB.$(OBJEXT) HighScoreDialog.$(OBJEXT) \ 57 SettingsDialog.$(OBJEXT) wxDynamicBitmap.$(OBJEXT) 57 SettingsDialog.$(OBJEXT) wxDynamicBitmap.$(OBJEXT) \ 58 About.$(OBJEXT) 58 59 openyahtzee_OBJECTS = $(am_openyahtzee_OBJECTS) 59 60 openyahtzee_LDADD = $(LDADD) … … 185 186 target_alias = @target_alias@ 186 187 openyahtzee_SOURCES = openyahtzee.cpp MainFrame.cpp five.xpm four.xpm one.xpm \ 187 six.xpm three.xpm two.xpm DBwrapper.cpp DBwrapper.h SettingsDB.cpp \188 HighScoreTableDB.cpp HighScoreDialog.cpp SettingsDialog.cpp icon.xpm icon32.xpm \189 openyahtzee.rc wxDynamicBitmap.cpp188 six.xpm three.xpm two.xpm DBwrapper.cpp DBwrapper.h SettingsDB.cpp \ 189 HighScoreTableDB.cpp HighScoreDialog.cpp SettingsDialog.cpp icon.xpm icon32.xpm \ 190 openyahtzee.rc wxDynamicBitmap.cpp About.cpp 190 191 191 192 … … 270 271 -rm -f *.tab.c 271 272 273 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/About.Po@am__quote@ 272 274 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DBwrapper.Po@am__quote@ 273 275 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HighScoreDialog.Po@am__quote@ -
trunk/OpenYahtzee/src/wxDynamicBitmap.cpp
r48 r65 22 22 #include "wxDynamicBitmap.h" 23 23 #include <wx/wx.h> 24 #include "ObjectsID.h" 24 25 25 26 #include <iostream> … … 32 33 Connect(id, wxEVT_PAINT, wxPaintEventHandler(wxDynamicBitmap::OnPaint)); 33 34 SetBitmap( bitmap); 35 Connect(id, wxEVT_LEFT_UP,wxMouseEventHandler(wxDynamicBitmap::OnClick)); 34 36 } 35 37 … … 71 73 return wxSize(m_bitmap.GetHeight(),m_bitmap.GetWidth()); 72 74 } 75 76 void wxDynamicBitmap::OnClick(wxMouseEvent& event) 77 { 78 //A hack that makes propogates wxEVT_COMMAND_BUTTON_CLICKED events to the parent of this control 79 wxCommandEvent newevent( wxEVT_COMMAND_BUTTON_CLICKED, GetId() ); 80 newevent.SetEventObject( this ); 81 GetEventHandler()->ProcessEvent( newevent ); 82 } -
trunk/OpenYahtzee/src/wxDynamicBitmap.h
r51 r65 45 45 wxBitmap GetBitmap(); 46 46 void OnPaint(wxPaintEvent& event); 47 void OnClick(wxMouseEvent& event); 47 48 wxSize DoGetBestSize() const; 48 49 private:
Note: See TracChangeset
for help on using the changeset viewer.
