Changeset 154 for trunk/src/MainFrame.cpp
- Timestamp:
- 09/22/2008 06:58:33 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/src/MainFrame.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MainFrame.cpp
r151 r154 449 449 if (m_rolls <= 0) //we don't have remaining rolls 450 450 ((wxButton*) FindWindow(ID_ROLL)) -> Enable(false); 451 452 // change the displayed roll counter 453 wxString caption = wxString::Format(wxT("Roll! (%i)"),m_rolls); 454 FindWindow(ID_ROLL)->SetLabel(caption); 451 455 452 456 //restore the 'keep' checkboxes … … 650 654 m_score_dice.SetDice(dice); 651 655 m_score_dice.SetYahtzeeJoker(YahtzeeJoker()); 652 m_rolls -= 1; 656 --m_rolls; 657 658 // change the displayed roll counter 659 wxString caption = wxString::Format(wxT("Roll! (%i)"),m_rolls); 660 FindWindow(ID_ROLL)->SetLabel(caption); 661 653 662 #ifndef DEBUG 654 if (m_rolls <= 0) 663 if (m_rolls <= 0) { 655 664 ((wxButton*) FindWindow(ID_ROLL)) -> Enable(false); 665 FindWindow(ID_ROLL)->SetLabel(wxT("Roll!")); 666 } 667 656 668 #endif 657 669 … … 901 913 m_rolls = 3; 902 914 ((wxButton*) FindWindow(ID_ROLL)) -> Enable(true); 915 916 // reset the roll count in the caption 917 FindWindow(ID_ROLL)->SetLabel(wxT("Roll! (3)")); 903 918 for (int i=0; i<5; i++){ 904 919 ((wxCheckBox*) FindWindow(i + ID_DICE1KEEP)) -> SetValue(false); … … 1241 1256 } 1242 1257 FindWindow(ID_ROLL)->Enable(roll_button_enabled); 1258 1259 // if there are rolls left we should display the count of them 1260 if (roll_button_enabled) { 1261 wxString caption = wxString::Format(wxT("Roll! (%i)"),m_rolls); 1262 FindWindow(ID_ROLL)->SetLabel(caption); 1263 } 1264 1243 1265 1244 1266 //BEGIN layout for the dice section of the score board
Note: See TracChangeset
for help on using the changeset viewer.
