Changeset 68
- Timestamp:
- 16/04/07 15:54:44 (6 years ago)
- File:
-
- 1 edited
-
trunk/OpenYahtzee/src/MainFrame.cpp (modified) (23 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/OpenYahtzee/src/MainFrame.cpp
r67 r68 350 350 * of a technical problem relating to the case an high-score was made and then 351 351 * the user undo the last move and rescore another high-score and so on. 352 * @param event352 * \param event 353 353 */ 354 354 void MainFrame::OnUndo(wxCommandEvent& event) … … 389 389 m_numofplaysleft++; 390 390 } 391 ///This function enables the undo button and stores the last move 391 392 /** 393 * This function enables the undo button and stores the last move 394 * \param id 395 */ 392 396 inline void MainFrame::EnableUndo(int id) 393 397 { … … 398 402 } 399 403 404 /** 405 * Shows the high-score dialog. Connected to the Game->"Show High Score" menu item. 406 * \param event 407 */ 400 408 void MainFrame::OnShowHighscore(wxCommandEvent& event) 401 409 { … … 404 412 } 405 413 414 /** 415 * Shows the settings dialog. This event-handler is connected to Game->Settings 416 * menu item. 417 * \param event 418 */ 406 419 void MainFrame::OnSettings( wxCommandEvent& event) 407 420 { … … 447 460 } 448 461 462 /** 463 * Event handler for the Roll button. It checks the settings if it should 464 * animate the dice and then rolls them accordingly. It also checks for the 465 * status of the "keep" checkboxes. 466 * \param event 467 */ 449 468 void MainFrame::OnRollButton (wxCommandEvent& event) 450 469 { … … 498 517 } 499 518 519 /** 520 * This is the event-handler for all of the scoring buttons of the upper section. 521 * 522 * It gets the id of the button that called the event handler by comparing it 523 * to the id of the aces button it figures what button was pressed, And updates 524 * the suiting score textbox (again by comparing the id to the one of the aces 525 * checbox). 526 * \param event 527 */ 500 528 void MainFrame::OnUpperButtons (wxCommandEvent& event) 501 529 { … … 515 543 } 516 544 545 /** 546 * Event handler for the "3 of a kind" score button. 547 * \param event 548 */ 517 549 void MainFrame::On3ofakindButton(wxCommandEvent& event) 518 550 { … … 542 574 } 543 575 576 /** 577 * Event handler for the "4 of a kind" score button. 578 * \param event 579 */ 544 580 void MainFrame::On4ofakindButton(wxCommandEvent& event) 545 581 { … … 569 605 } 570 606 607 /** 608 * Event handler for the full-house score button. 609 * \param event 610 */ 571 611 void MainFrame::OnFullHouseButton(wxCommandEvent& event) 572 612 { … … 594 634 } 595 635 636 /** 637 * Event handler for the small-sequence score button. 638 * \param event 639 */ 596 640 void MainFrame::OnSmallSequenceButton(wxCommandEvent& event) 597 641 { … … 616 660 } 617 661 662 /** 663 * Event handler for the large-sequence score button. 664 * \param event 665 */ 618 666 void MainFrame::OnLargeSequenceButton(wxCommandEvent& event) 619 667 { … … 637 685 } 638 686 687 /** 688 * Event handler for the yahtzee score button. 689 * \param event 690 */ 639 691 void MainFrame::OnYahtzeeButton(wxCommandEvent& event) 640 692 { … … 653 705 } 654 706 707 /** 708 * Evnet handler for the chance score button. 709 * \param event 710 */ 655 711 void MainFrame::OnChanceButton (wxCommandEvent& event) 656 712 { … … 672 728 } 673 729 730 /** 731 * Event handler for mouse clicks on the dice. 732 * 733 * When clicking on the dice this event-handler ticks the appropriate "keep" checkbox. 734 * \param event 735 */ 674 736 void MainFrame::OnDiceClick (wxCommandEvent& event) 675 737 { … … 684 746 //******************************************** 685 747 748 /** 749 * This function clears the dice hash. 750 * 751 * The dice hash is just an array that holds how many dices have each value. 752 */ 686 753 void MainFrame::ClearDiceHash() 687 754 { … … 690 757 } 691 758 759 /** 760 * This function handles everything related to reseting the dice rolls after scoring. 761 */ 692 762 void MainFrame::ResetRolls() 693 763 { … … 701 771 } 702 772 773 /** 774 * This function checks for a Yahtzee Bonus situation and if one exists it scores accordingly. 775 */ 703 776 void MainFrame::YahtzeeBonus() 704 777 { … … 719 792 } 720 793 794 /** 795 * This function checks whether we have a Yahtzee Joker situation. 796 * \return true if there is Yahtzee Joker, false otherwise. 797 */ 721 798 bool MainFrame::YahtzeeJoker() 722 799 { … … 727 804 } 728 805 806 /** 807 * This function handles the end of game. 808 * 809 * When a game ends it calculates the total score and submit it to the high 810 * score list. 811 */ 729 812 void MainFrame::EndofGame() 730 813 { … … 779 862 } 780 863 864 /** 865 * This function checks if a given score qualifies for the high score list and 866 * adds it to the list if it does. 867 * @param score The score submitted to the high score list. 868 */ 781 869 void MainFrame::HighScoreHandler(int score) 782 870 { … … 811 899 812 900 ///this function handles all the post scoring stuff such as disabling the right button. 901 /** 902 * This function is always called after scoring and it handles all the post-score 903 * stuff such as reseting the dice rolls, enabling the undo button, calculating 904 * the sub-total scores and ending the game if necessary. 905 * \param id 906 */ 813 907 void MainFrame::PostScore(int id) 814 908 { … … 825 919 } 826 920 921 /** 922 * This function calculates the sub-total scores and should be called after 923 * every score. It does so only if this feature is requested in the settings 924 * dialog. 925 */ 827 926 void MainFrame::CalculateSubTotal() 828 927 { … … 854 953 } 855 954 955 /** 956 * This function launches the default browser and directs it to a given url. 957 * 958 * This function extends the wxWidgets default function for this job by checking manually for 959 * different browsers if the wxWidgets' function doesn't find one. This is usually necessary 960 * under linux when epiphany isn't installed for some unknown reason. 961 * @param link The url that the browser will go to when it stats. 962 */ 856 963 void MainFrame::LaunchBrowser (wxString link){ 857 964 if (!wxLaunchDefaultBrowser(link)){
Note: See TracChangeset
for help on using the changeset viewer.
