Changeset 179 for trunk/src


Ignore:
Timestamp:
10/14/2008 11:10:31 PM (4 years ago)
Author:
guyru
Message:

update links in help menu

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MainFrame.cpp

    r178 r179  
    135135        /*Create the menus*/ 
    136136        wxMenu *gameMenu = new wxMenu;  //create Game menu 
    137         wxMenu *helpMenu = new wxMenu;  //create Help menu 
     137        wxMenu *help_menu = new wxMenu; //create Help menu 
    138138         
    139139         
    140140        //insert menu items into menu Help 
    141         helpMenu->Append(ID_CHECK_FOR_UPDATES, wxT("&Check for Updates")); 
    142         helpMenu->AppendSeparator(); 
    143         helpMenu->Append(ID_SENDCOMMENT, wxT("&Send a Comment to Developers")); 
    144         helpMenu->AppendSeparator(); 
    145         helpMenu->Append(wxID_ABOUT, wxT("&About...\tF1")); 
     141        help_menu->Append(ID_HOWTOPLAY, wxT("How to Play\tF1")); 
     142        help_menu->Append(ID_FAQ, wxT("Frequently Asked Questions")); 
     143        help_menu->Append(ID_SENDCOMMENT, wxT("&Send Feedback")); 
     144        help_menu->Append(wxID_ABOUT); 
    146145 
    147146        //insert menu items into menu Game 
     
    155154        wxMenuBar *menuBar = new wxMenuBar(); 
    156155        menuBar->Append(gameMenu, wxT("&Game")); 
    157         menuBar->Append(helpMenu, wxT("&Help")); 
     156        menuBar->Append(help_menu, wxT("&Help")); 
    158157         
    159158        // ... and attach this menu bar to the frame 
     
    340339        Connect(wxID_EXIT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnQuit)); 
    341340        Connect(wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnAbout)); 
    342         Connect(ID_CHECK_FOR_UPDATES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnCheckForUpdates)); 
     341        Connect(ID_HOWTOPLAY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnHelpMenuLink)); 
     342        Connect(ID_FAQ, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnHelpMenuLink)); 
    343343        Connect(ID_SENDCOMMENT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnSendComment)); 
    344344        Connect(wxID_NEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnNewGame)); 
     
    392392} 
    393393 
    394 /** 
    395  * Connects to the Open Yahtzee website on sourceforge.net and checks for  
    396  * updates to the game. 
    397  * \param event  
    398  */ 
    399 void MainFrame::OnCheckForUpdates (wxCommandEvent& event) 
    400 { 
    401          
    402         wxString link = wxT("http://openyahtzee.sourceforge.net/download/check-for-updates/"); 
    403          
    404         link += wxT(VERSION); 
    405  
     394void MainFrame::OnHelpMenuLink (wxCommandEvent& event) 
     395{ 
     396        wxString link; 
     397        switch (event.GetId()) { 
     398        case ID_HOWTOPLAY: 
     399                link = wxT("http://www.openyahtzee.org/wiki/HowToPlay"); 
     400                break; 
     401        case ID_FAQ: 
     402                link = wxT("http://www.openyahtzee.org/wiki/FAQ"); 
     403                break; 
     404        } 
     405         
    406406        wxLaunchDefaultBrowser(link); 
    407407} 
     
    415415void MainFrame::OnSendComment (wxCommandEvent& event) 
    416416{ 
    417         wxString link = wxT("http://openyahtzee.sourceforge.net/feedback/"); 
     417        wxString link = wxT("http://www.guyrutenberg.com/contact-me"); 
    418418         
    419419        wxLaunchDefaultBrowser(link); 
  • trunk/src/MainFrame.h

    r169 r179  
    5151        void OnShowHighscore (wxCommandEvent& event); 
    5252        void OnSettings (wxCommandEvent& event); 
    53         void OnCheckForUpdates (wxCommandEvent& event); 
    5453        void OnSendComment (wxCommandEvent& event); 
     54        void OnHelpMenuLink (wxCommandEvent& event); 
    5555 
    5656        void OnRollButton (wxCommandEvent& event); 
  • trunk/src/ObjectsID.h

    r151 r179  
    2727        ID_SETTINGS, 
    2828        ID_THEMES, 
    29         ID_CHECK_FOR_UPDATES, 
     29        ID_HOWTOPLAY, 
     30        ID_FAQ, 
    3031        ID_SENDCOMMENT, 
    3132         
Note: See TracChangeset for help on using the changeset viewer.