Changeset 137 for trunk/src


Ignore:
Timestamp:
01/13/2008 03:28:16 PM (4 years ago)
Author:
guyru
Message:

added theme dialog

Location:
trunk/src
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MainFrame.cpp

    r130 r137  
    11// $Header$ 
    22/*************************************************************************** 
    3  *   Copyright (C) 2006-2007 by Guy Rutenberg   * 
     3 *   Copyright (C) 2006-2008 by Guy Rutenberg   * 
    44 *   guyrutenberg@gmail.com   * 
    55 *                                                                         * 
     
    3434#include "HighScoreDialog.h" 
    3535#include "SettingsDialog.h" 
     36#include "dice_theme_dialog.h" 
    3637#include "About.h" 
    3738#include "UtilityFunctions.h" 
     
    136137        gameMenu->Append(ID_SHOWHIGHSCORE,wxT("High &Scores"),wxT("Show high-scores table")); 
    137138        gameMenu->Append(ID_SETTINGS,wxT("Settings"),wxT("Show settings dialog")); 
     139        gameMenu->Append(ID_THEMES,wxT("Dice Theme..."),wxT("Select a dice theme")); 
    138140        gameMenu->Append(wxID_EXIT, wxT("E&xit\tAlt-X"), 
    139141                        wxT("Quit this program")); 
     
    333335        Connect(ID_SHOWHIGHSCORE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnShowHighscore)); 
    334336        Connect(ID_SETTINGS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnSettings)); 
     337        Connect(ID_THEMES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(MainFrame::OnDiceTheme)); 
    335338        //END connecting the menu items' events 
    336339 
     
    577580                Relayout(); 
    578581        } 
     582} 
     583 
     584/** 
     585 * Shows the dice theme selection dialog. This event-handler is connected to 
     586 * Game->Dice Theme menu item. 
     587 * \param event  
     588 */ 
     589void MainFrame::OnDiceTheme( wxCommandEvent& event) 
     590{ 
     591        DiceThemeDialog *dialog = new DiceThemeDialog(this,wxID_ANY); 
     592 
     593        if(dialog->ShowModal()!=wxID_OK) 
     594                return; 
     595 
    579596} 
    580597 
  • trunk/src/MainFrame.h

    r130 r137  
    11// $Header$ 
    22/*************************************************************************** 
    3  *   Copyright (C) 2006-2007 by Guy Rutenberg   * 
     3 *   Copyright (C) 2006-2008 by Guy Rutenberg   * 
    44 *   guyrutenberg@gmail.com   * 
    55 *                                                                         * 
     
    5252        void OnShowHighscore (wxCommandEvent& event); 
    5353        void OnSettings (wxCommandEvent& event); 
     54        void OnDiceTheme( wxCommandEvent& event); 
    5455        void OnCheckForUpdates (wxCommandEvent& event); 
    5556        void OnSendComment (wxCommandEvent& event); 
  • trunk/src/Makefile.am

    r136 r137  
    11bin_PROGRAMS = openyahtzee 
    22openyahtzee_SOURCES = openyahtzee.cpp MainFrame.cpp DBwrapper.cpp \ 
    3         SettingsDB.cpp HighScoreTableDB.cpp HighScoreDialog.cpp SettingsDialog.cpp \ 
    4         icon.xpm icon32.xpm wxDynamicBitmap.cpp About.cpp \ 
    5         UtilityFunctions.cpp ScoreDice.cpp dice_graphics.cpp 
     3        HighScoreTableDB.cpp HighScoreDialog.cpp SettingsDialog.cpp \ 
     4        SettingsDB.cpp icon.xpm icon32.xpm wxDynamicBitmap.cpp About.cpp \ 
     5        UtilityFunctions.cpp ScoreDice.cpp dice_graphics.cpp \ 
     6        dice_theme_dialog.cpp 
    67 
    78# set the include path found by configure 
     
    2021        HighScoreDialog.h SettingsDialog.h Icon.h icon32.ico wxDynamicBitmap.h \ 
    2122        About.h UtilityFunctions.h ScoreDice.h dice_graphics.h DBwrapper.h \ 
    22         $(dice_graphics) 
     23        dice_theme_dialog.h $(dice_graphics) 
    2324 
    2425AM_CXXFLAGS = `wx-config --cxxflags` 
  • trunk/src/ObjectsID.h

    r57 r137  
    2828        ID_SHOWHIGHSCORE, 
    2929        ID_SETTINGS, 
     30        ID_THEMES, 
    3031        ID_CHECK_FOR_UPDATES, 
    3132        ID_SENDCOMMENT, 
Note: See TracChangeset for help on using the changeset viewer.