Ignore:
Timestamp:
05/03/2009 05:12:43 PM (3 years ago)
Author:
guyru
Message:

Simple statistics dialog, make statistics class store last reset date

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MainFrame.cpp

    r195 r199  
    3434#include "configuration.h" 
    3535#include "settings_dialog.h" 
     36#include "statistics_dialog.h" 
    3637#include "../config.h" 
    3738#include <iostream> 
     
    150151        gameMenu->Append(wxID_UNDO,wxT("&Undo\tCtrl+Z")); 
    151152        gameMenu->Append(ID_SHOWHIGHSCORE,wxT("Show Highscores\tCtrl+H")); 
     153        gameMenu->Append(ID_STATISTICS,wxT("Statistics...")); 
    152154        gameMenu->Append(ID_SETTINGS,wxT("Settings")); 
    153155        gameMenu->Append(wxID_EXIT); 
     
    347349        Connect(wxID_UNDO, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnUndo)); 
    348350        Connect(ID_SHOWHIGHSCORE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnShowHighscore)); 
     351        Connect(ID_STATISTICS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnStatistics)); 
    349352        Connect(ID_SETTINGS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnSettings)); 
    350353        //END connecting the menu items' events 
     
    522525        dialog->ShowModal(); 
    523526 
     527        delete dialog; 
     528} 
     529 
     530void MainFrame::OnStatistics(wxCommandEvent &event) 
     531{ 
     532        statistics_dialog::StatisticsDialog *dialog = new statistics_dialog::StatisticsDialog(this, m_stats); 
     533        dialog->ShowModal(); 
    524534        delete dialog; 
    525535} 
Note: See TracChangeset for help on using the changeset viewer.