| 1 | /*************************************************************************** |
| 2 | * Copyright (C) 2006-2016 by Guy Rutenberg * |
| 3 | * [email protected] * |
| 4 | * * |
| 5 | * This program is free software; you can redistribute it and/or modify * |
| 6 | * it under the terms of the GNU General Public License as published by * |
| 7 | * the Free Software Foundation; either version 2 of the License, or * |
| 8 | * (at your option) any later version. * |
| 9 | * * |
| 10 | * This program is distributed in the hope that it will be useful, * |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * |
| 13 | * GNU General Public License for more details. * |
| 14 | * * |
| 15 | * You should have received a copy of the GNU General Public License * |
| 16 | * along with this program; if not, write to the * |
| 17 | * Free Software Foundation, Inc., * |
| 18 | * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * |
| 19 | ***************************************************************************/ |
| 20 | |
| 21 | /*********************************************** |
| 22 | * This File contains the definitions * |
| 23 | * of MainFrame's functions * |
| 24 | ***********************************************/ |
| 25 | |
| 26 | //#define DEBUG |
| 27 | |
| 28 | #include <wx/wx.h> |
| 29 | |
| 30 | #include "MainFrame.h"cxx . . $ `<file>/src/MainFrame.h`/ |
| 31 | #include "wxDynamicBitmap.h"cxx . . $ `<file>/src/wxDynamicBitmap.h`/ |
| 32 | #include "highscores_dialog.h"cxx . . $ `<file>/src/highscores_dialog.h`/ |
| 33 | #include "about.h"cxx . . $ `<file>/src/about.h`/ |
| 34 | #include "configuration.h"cxx . . $ `<file>/src/configuration.h`/ |
| 35 | #include "settings_dialog.h"cxx . . $ `<file>/src/settings_dialog.h`/ |
| 36 | #include "../config.h"cxx . . $ `<file>/config.h`/ |
| 37 | #include <iostream> |
| 38 | #include <functional> |
| 39 | #include <sstream> |
| 40 | #include <cstdlib> |
| 41 | #include <random> |
| 42 | #include <chrono> |
| 43 | #include <wx/version.h> |
| 44 | #include <wx/filename.h> |
| 45 | #include <wx/stdpaths.h> |
| 46 | #include <wx/mstream.h> |
| 47 | |
| 48 | //include the images for the dice |
| 49 | namespace dicecxx . . $ dice/ { |
| 50 | #include "one.xpm"cxx . . $ `<file>/src/one.xpm`/ |
| 51 | #include "two.xpm"cxx . . $ `<file>/src/two.xpm`/ |
| 52 | #include "three.xpm"cxx . . $ `<file>/src/three.xpm`/ |
| 53 | #include "four.xpm"cxx . . $ `<file>/src/four.xpm`/ |
| 54 | #include "five.xpm"cxx . . $ `<file>/src/five.xpm`/ |
| 55 | #include "six.xpm"cxx . . $ `<file>/src/six.xpm`/ |
| 56 | } // namespace dice |
| 57 | |
| 58 | #include "icon32.xpm"cxx . . $ `<file>/src/icon32.xpm`/ |
| 59 | |
| 60 | using namespace main_frame; |
| 61 | |
| 62 | MainFramecxx . . $ main_frame/MainFrame#::MainFramecxx . . $ main_frame/MainFrame#MainFrame(2e2876ea9d2613ae).(const wxStringcxx . . $ wxString#& title, const wxSizecxx . . $ wxSize#& size, long style) |
| 63 | : wxFramecxx . . $ wxFrame#wxFrame(d091a3913c1b2ac).(NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, wxID_ANYcxx . . $ wxID_ANY., title, wxDefaultPositioncxx . . $ wxDefaultPosition., size, style) |
| 64 | { |
| 65 | //give the frame an icon |
| 66 | SetIconcxx . . $ wxTopLevelWindowBase#SetIcon(d249de01a60891a7).(wxIconcxx . . $ wxIcon#wxIcon(ac4b840ac9fbb56d).(icon32_xpmcxx . . $ icon32_xpm.)); |
| 67 | |
| 68 | #ifndef PORTABLE |
| 69 | wxStringcxx . . $ wxString# config_file = wxStandardPathscxx . . $ wxString#wxString(c410f49fea108c7d).::Getcxx . . $ wxStandardPathsBase#Get(26dbef459f22cfe7).().GetUserConfigDircxx . . $ wxStandardPaths#GetUserConfigDir(fd613287981dc2d5).() +cxx . . $ operator+(707d0521c75ba302). wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("/.openyahtzee"); |
| 70 | wxStringcxx . . $ wxString# old_config_file = wxFileNamecxx . . $ wxString#wxString(c410f49fea108c7d).::GetHomeDircxx . . $ wxFileName#GetHomeDir(259bc8ab0df90bfc).() +cxx . . $ operator+(707d0521c75ba302). wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("/.OpenYahtzee"); |
| 71 | // Move the configuration file from the old name to the new one |
| 72 | // if there isn't a file with that name already. |
| 73 | if (wxFileExistscxx . . $ wxFileExists(58f28235e2622c4a).(old_config_file) && !wxFileExistscxx . . $ wxFileExists(58f28235e2622c4a).(config_file)) { |
| 74 | wxRenameFilecxx . . $ wxRenameFile(e7e2f968e0fe394d).(old_config_file,config_file,false); |
| 75 | } |
| 76 | #else |
| 77 | wxFileName tmp_config_file(wxStandardPaths::Get().GetExecutablePath()); |
| 78 | tmp_config_file.SetFullName(wxT("openyahtzee.dat")); |
| 79 | wxString config_file = tmp_config_file.GetFullPath(); |
| 80 | #endif |
| 81 | |
| 82 | |
| 83 | stdcxx . . $ std/::stringcxx . . $ std/string# config_file_strcxx . . $ std/__cxx11/basic_string#basic_string(49f6e7a06ebc5aa8).; |
| 84 | config_file_str =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). config_file.utf8_strcxx . . $ wxString#utf8_str(40909dc60c37c281).(); |
| 85 | m_configcxx . . $ main_frame/MainFrame#m_config..resetcxx . . $ boost/scoped_ptr#reset(ebd0a1552f8ce24f).(new configurationcxx . . $ configuration/::Configurationcxx . . $ configuration/Configuration#(config_file_strcxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5).)); |
| 86 | |
| 87 | m_evt_handlercxx . . $ main_frame/MainFrame#m_evt_handler. = new MainFrameEvtHandlercxx . . $ main_frame/MainFrameEvtHandler#MainFrameEvtHandler(4bf17b2bd9d1ee9d).(this); |
| 88 | |
| 89 | bitmap_dicecxx . . $ main_frame/MainFrame#bitmap_dice.[0] = new wxBitmapcxx . . $ wxBitmap#wxBitmap(ac4b840ac9fbb56d).(dicecxx . . $ dice/::one_xpmcxx . . $ dice/one_xpm.); |
| 90 | bitmap_dicecxx . . $ main_frame/MainFrame#bitmap_dice.[1] = new wxBitmapcxx . . $ wxBitmap#wxBitmap(ac4b840ac9fbb56d).(dicecxx . . $ dice/::two_xpmcxx . . $ dice/two_xpm.); |
| 91 | bitmap_dicecxx . . $ main_frame/MainFrame#bitmap_dice.[2] = new wxBitmapcxx . . $ wxBitmap#wxBitmap(ac4b840ac9fbb56d).(dicecxx . . $ dice/::three_xpmcxx . . $ dice/three_xpm.); |
| 92 | bitmap_dicecxx . . $ main_frame/MainFrame#bitmap_dice.[3] = new wxBitmapcxx . . $ wxBitmap#wxBitmap(ac4b840ac9fbb56d).(dicecxx . . $ dice/::four_xpmcxx . . $ dice/four_xpm.); |
| 93 | bitmap_dicecxx . . $ main_frame/MainFrame#bitmap_dice.[4] = new wxBitmapcxx . . $ wxBitmap#wxBitmap(ac4b840ac9fbb56d).(dicecxx . . $ dice/::five_xpmcxx . . $ dice/five_xpm.); |
| 94 | bitmap_dicecxx . . $ main_frame/MainFrame#bitmap_dice.[5] = new wxBitmapcxx . . $ wxBitmap#wxBitmap(ac4b840ac9fbb56d).(dicecxx . . $ dice/::six_xpmcxx . . $ dice/six_xpm.); |
| 95 | |
| 96 | AddMenuscxx . . $ main_frame/MainFrame#AddMenus(49f6e7a06ebc5aa8).(); |
| 97 | |
| 98 | AddControlsAndLayoutcxx . . $ main_frame/MainFrame#AddControlsAndLayout(49f6e7a06ebc5aa8).(); |
| 99 | |
| 100 | //make the text boxes uneditable to the user |
| 101 | wxTextCtrlcxx . . $ wxTextCtrl# *textctrl; |
| 102 | for(int i = ID_ACESTEXTcxx . . $ main_frame/ID_ACESTEXT.;i<=ID_GRANDTOTALcxx . . $ main_frame/ID_GRANDTOTAL.;i++) { |
| 103 | textctrl = (wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i); |
| 104 | textctrl->SetEditablecxx . . $ wxTextCtrl#SetEditable(b45ddcbc8423892c).(false); |
| 105 | } |
| 106 | |
| 107 | //disable the undo button |
| 108 | (GetMenuBarcxx . . $ wxFrameBase#GetMenuBar(f8cc4cf0e2c6581c).()->FindItemcxx . . $ wxMenuBar#FindItem(6de9ae6c79736abe).(wxID_UNDOcxx . . $ wxID_UNDO.))->Enablecxx . . $ wxMenuItem#Enable(b45ddcbc8423892c).(false); |
| 109 | |
| 110 | ConnectEventTablecxx . . $ main_frame/MainFrame#ConnectEventTable(49f6e7a06ebc5aa8).(); |
| 111 | |
| 112 | ResetRollscxx . . $ main_frame/MainFrame#ResetRolls(49f6e7a06ebc5aa8).(); |
| 113 | m_yahtzeecxx . . $ main_frame/MainFrame#m_yahtzee. = false; |
| 114 | m_yahtzeebonuscxx . . $ main_frame/MainFrame#m_yahtzeebonus. = false; |
| 115 | m_numofplaysleftcxx . . $ main_frame/MainFrame#m_numofplaysleft. = 13; |
| 116 | } |
| 117 | |
| 118 | /** |
| 119 | * Adds the menus and menu items to the MainFrame. |
| 120 | */ |
| 121 | void MainFramecxx . . $ main_frame/MainFrame#::AddMenuscxx . . $ main_frame/MainFrame#AddMenus(49f6e7a06ebc5aa8).() |
| 122 | { |
| 123 | /*Create the menus*/ |
| 124 | wxMenucxx . . $ wxMenu# *gameMenu = new wxMenucxx . . $ wxMenu#wxMenu(1624ee8275b10bda).; //create Game menu |
| 125 | wxMenucxx . . $ wxMenu# *help_menu = new wxMenucxx . . $ wxMenu#wxMenu(1624ee8275b10bda).; //create Help menu |
| 126 | |
| 127 | |
| 128 | //insert menu items into menu Help |
| 129 | help_menu->Appendcxx . . $ wxMenuBase#Append(7e29951ed8e15407).(ID_HOWTOPLAYcxx . . $ main_frame/ID_HOWTOPLAY., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("How to Play\tF1")); |
| 130 | help_menu->Appendcxx . . $ wxMenuBase#Append(7e29951ed8e15407).(ID_FAQcxx . . $ main_frame/ID_FAQ., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Frequently Asked Questions")); |
| 131 | help_menu->Appendcxx . . $ wxMenuBase#Append(7e29951ed8e15407).(ID_SENDCOMMENTcxx . . $ main_frame/ID_SENDCOMMENT., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("&Send Feedback")); |
| 132 | help_menu->Appendcxx . . $ wxMenuBase#Append(7e29951ed8e15407).(wxID_ABOUTcxx . . $ wxID_ABOUT.); |
| 133 | |
| 134 | //insert menu items into menu Game |
| 135 | gameMenu->Appendcxx . . $ wxMenuBase#Append(7e29951ed8e15407).(wxID_NEWcxx . . $ wxID_NEW.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("&New Game\tF2")); |
| 136 | gameMenu->Appendcxx . . $ wxMenuBase#Append(7e29951ed8e15407).(wxID_UNDOcxx . . $ wxID_UNDO.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("&Undo\tCtrl+Z")); |
| 137 | gameMenu->Appendcxx . . $ wxMenuBase#Append(7e29951ed8e15407).(ID_SHOWHIGHSCOREcxx . . $ main_frame/ID_SHOWHIGHSCORE.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Show Highscores\tCtrl+H")); |
| 138 | gameMenu->Appendcxx . . $ wxMenuBase#Append(7e29951ed8e15407).(ID_SETTINGScxx . . $ main_frame/ID_SETTINGS.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Settings")); |
| 139 | gameMenu->Appendcxx . . $ wxMenuBase#Append(7e29951ed8e15407).(wxID_EXITcxx . . $ wxID_EXIT.); |
| 140 | |
| 141 | // Declare the menu-bar and append the freshly created menus to the menu bar... |
| 142 | wxMenuBarcxx . . $ wxMenuBar# *menuBar = new wxMenuBarcxx . . $ wxMenuBar#wxMenuBar(49f6e7a06ebc5aa8).(); |
| 143 | menuBar->Appendcxx . . $ wxMenuBar#Append(cf90331547e892f9).(gameMenu, wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("&Game")); |
| 144 | menuBar->Appendcxx . . $ wxMenuBar#Append(cf90331547e892f9).(help_menu, wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("&Help")); |
| 145 | |
| 146 | // ... and attach this menu bar to the frame |
| 147 | SetMenuBarcxx . . $ wxFrameBase#SetMenuBar(883a2023f3aecf01).(menuBar); |
| 148 | } |
| 149 | |
| 150 | /** |
| 151 | * Add the controls to the frame and use sizers to lay them out. |
| 152 | */ |
| 153 | void MainFramecxx . . $ main_frame/MainFrame#::AddControlsAndLayoutcxx . . $ main_frame/MainFrame#AddControlsAndLayout(49f6e7a06ebc5aa8).() |
| 154 | { |
| 155 | wxPanelcxx . . $ wxPanel#* panel = new wxPanelcxx . . $ wxPanel#(this, ID_PANELcxx . . $ main_frame/ID_PANEL., |
| 156 | wxDefaultPositioncxx . . $ wxDefaultPosition., wxDefaultSizecxx . . $ wxDefaultSize.); |
| 157 | |
| 158 | wxBoxSizercxx . . $ wxBoxSizer# *topSizer; |
| 159 | |
| 160 | if (m_configcxx . . $ main_frame/MainFrame#m_config.->cxx . . $ boost/scoped_ptr#`operator->`(5a2a78a048fb49a8).getcxx . . $ configuration/Configuration#get(24764cae04130674).("horizontal-layout"cxx . . $ std/__cxx11/basic_string#basic_string(3bc0f77cdfbaa67f).)==cxx . . $ std/`operator==`(4b17aa87c9f300c6)."True") { |
| 161 | topSizer = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).( wxVERTICALcxx . . $ wxVERTICAL. ); |
| 162 | sectionsSizercxx . . $ main_frame/MainFrame#sectionsSizer. = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).( wxHORIZONTALcxx . . $ wxHORIZONTAL. ); |
| 163 | diceSizercxx . . $ main_frame/MainFrame#diceSizer. = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).( wxHORIZONTALcxx . . $ wxHORIZONTAL. ); |
| 164 | } else { |
| 165 | topSizer = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).( wxHORIZONTALcxx . . $ wxHORIZONTAL. ); |
| 166 | sectionsSizercxx . . $ main_frame/MainFrame#sectionsSizer. = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).( wxVERTICALcxx . . $ wxVERTICAL. ); |
| 167 | diceSizercxx . . $ main_frame/MainFrame#diceSizer. = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).( wxVERTICALcxx . . $ wxVERTICAL. ); |
| 168 | } |
| 169 | |
| 170 | uppersectioncxx . . $ main_frame/MainFrame#uppersection. = new wxStaticBoxSizercxx . . $ wxStaticBoxSizer#( new wxStaticBoxcxx . . $ wxStaticBox#( |
| 171 | panel, wxID_ANYcxx . . $ wxID_ANY., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Upper Section") ), wxVERTICALcxx . . $ wxVERTICAL.); |
| 172 | |
| 173 | lowersectioncxx . . $ main_frame/MainFrame#lowersection. = new wxStaticBoxSizercxx . . $ wxStaticBoxSizer#(new wxStaticBoxcxx . . $ wxStaticBox#( |
| 174 | panel, wxID_ANYcxx . . $ wxID_ANY., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Lower Section") ), wxVERTICALcxx . . $ wxVERTICAL.); |
| 175 | |
| 176 | wxFlexGridSizercxx . . $ wxFlexGridSizer#* uppergrid = new wxFlexGridSizercxx . . $ wxFlexGridSizer#(2, 0, 10); |
| 177 | wxFlexGridSizercxx . . $ wxFlexGridSizer#* lowergrid = new wxFlexGridSizercxx . . $ wxFlexGridSizer#(2, 0, 10); |
| 178 | |
| 179 | const int SPACE_SIZE = 1; |
| 180 | |
| 181 | //BEGIN layout for the upper section of the score board |
| 182 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel,ID_ACEScxx . . $ main_frame/ID_ACES.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Aces")), |
| 183 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 184 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_ACESTEXTcxx . . $ main_frame/ID_ACESTEXT.),1,wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 185 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel,ID_TWOScxx . . $ main_frame/ID_TWOS.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Twos")), |
| 186 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 187 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_TWOSTEXTcxx . . $ main_frame/ID_TWOSTEXT.),1,wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 188 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel,ID_THREEScxx . . $ main_frame/ID_THREES.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Threes")), |
| 189 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 190 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_THREESTEXTcxx . . $ main_frame/ID_THREESTEXT.),1,wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 191 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel,ID_FOURScxx . . $ main_frame/ID_FOURS.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Fours")), |
| 192 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 193 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_FOURSTEXTcxx . . $ main_frame/ID_FOURSTEXT.),1,wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 194 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel,ID_FIVEScxx . . $ main_frame/ID_FIVES.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Fives")), |
| 195 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 196 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_FIVESTEXTcxx . . $ main_frame/ID_FIVESTEXT.),1,wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 197 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel,ID_SIXEScxx . . $ main_frame/ID_SIXES.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Sixes")), |
| 198 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 199 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_SIXESTEXTcxx . . $ main_frame/ID_SIXESTEXT.),1,wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 200 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxStaticTextcxx . . $ wxStaticText#(panel, wxID_ANYcxx . . $ wxID_ANY., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Total score:")), |
| 201 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 202 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_UPPERSECTIONTOTALcxx . . $ main_frame/ID_UPPERSECTIONTOTAL.), |
| 203 | 1, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 204 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxStaticTextcxx . . $ wxStaticText#(panel, wxID_ANYcxx . . $ wxID_ANY., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Bonus:")), |
| 205 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 206 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_BONUScxx . . $ main_frame/ID_BONUS.),1,wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 207 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxStaticTextcxx . . $ wxStaticText#(panel, wxID_ANYcxx . . $ wxID_ANY., |
| 208 | wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Total of upper section:")), 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 209 | uppergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_UPPERTOTALcxx . . $ main_frame/ID_UPPERTOTAL.), |
| 210 | 1, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 211 | //END layout for the upper section of the score board |
| 212 | |
| 213 | //BEGIN layout for the lower section of the score board |
| 214 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel,ID_THREEOFAKINDcxx . . $ main_frame/ID_THREEOFAKIND.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("3 of a kind")), |
| 215 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 216 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_THREEOFAKINDTEXTcxx . . $ main_frame/ID_THREEOFAKINDTEXT.), |
| 217 | 1, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 218 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel,ID_FOUROFAKINDcxx . . $ main_frame/ID_FOUROFAKIND.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("4 of a kind")), |
| 219 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 220 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_FOUROFAKINDTEXTcxx . . $ main_frame/ID_FOUROFAKINDTEXT.), |
| 221 | 1, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 222 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel,ID_FULLHOUSEcxx . . $ main_frame/ID_FULLHOUSE.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Full House")), |
| 223 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 224 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_FULLHOUSETEXTcxx . . $ main_frame/ID_FULLHOUSETEXT.), |
| 225 | 1, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 226 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel, ID_SMALLSEQUENCEcxx . . $ main_frame/ID_SMALLSEQUENCE., |
| 227 | wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Sequence of 4")), 0, wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 228 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_SMALLSEQUENCETEXTcxx . . $ main_frame/ID_SMALLSEQUENCETEXT.), |
| 229 | 1, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 230 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel, ID_LARGESEQUENCEcxx . . $ main_frame/ID_LARGESEQUENCE., |
| 231 | wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Sequence of 5")), 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 232 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_LARGESEQUENCETEXTcxx . . $ main_frame/ID_LARGESEQUENCETEXT.), |
| 233 | 1, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 234 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel, ID_YAHTZEEcxx . . $ main_frame/ID_YAHTZEE., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Yahtzee")), |
| 235 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 236 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel,ID_YAHTZEETEXTcxx . . $ main_frame/ID_YAHTZEETEXT.),1,wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 237 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel, ID_CHANCEcxx . . $ main_frame/ID_CHANCE., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Chance")), |
| 238 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 239 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_CHANCETEXTcxx . . $ main_frame/ID_CHANCETEXT.),1,wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 240 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxStaticTextcxx . . $ wxStaticText#(panel, wxID_ANYcxx . . $ wxID_ANY., |
| 241 | wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Yahtzee Bonus")), 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 242 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_YAHTZEEBONUSTEXTcxx . . $ main_frame/ID_YAHTZEEBONUSTEXT.), |
| 243 | 1, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 244 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxStaticTextcxx . . $ wxStaticText#(panel, wxID_ANYcxx . . $ wxID_ANY., |
| 245 | wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Total of lower section:")),0,wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 246 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_LOWERTOTALcxx . . $ main_frame/ID_LOWERTOTAL.),1,wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 247 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxStaticTextcxx . . $ wxStaticText#(panel, wxID_ANYcxx . . $ wxID_ANY., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Grand Total:")), |
| 248 | 0, wxALLcxx . . $ wxALL., SPACE_SIZE); |
| 249 | lowergrid->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxTextCtrlcxx . . $ wxTextCtrl#wxTextCtrl(841ce057da6dc6d9).(panel, ID_GRANDTOTALcxx . . $ main_frame/ID_GRANDTOTAL.),1,wxALLcxx . . $ wxALL.,SPACE_SIZE); |
| 250 | //END layout for the lower section of the score board |
| 251 | |
| 252 | uppersectioncxx . . $ main_frame/MainFrame#uppersection.->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(uppergrid); |
| 253 | lowersectioncxx . . $ main_frame/MainFrame#lowersection.->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(lowergrid); |
| 254 | sectionsSizercxx . . $ main_frame/MainFrame#sectionsSizer.->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(uppersectioncxx . . $ main_frame/MainFrame#uppersection., 0, wxALLcxx . . $ wxALL., 5); |
| 255 | sectionsSizercxx . . $ main_frame/MainFrame#sectionsSizer.->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(lowersectioncxx . . $ main_frame/MainFrame#lowersection., 0, wxALLcxx . . $ wxALL., 5); |
| 256 | |
| 257 | //BEGIN layout for the dice section of the score board |
| 258 | for (int i = 0; i < 5; i++) { |
| 259 | auto box_sizer = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).(wxVERTICALcxx . . $ wxVERTICAL.); |
| 260 | box_sizer->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxDynamicBitmapcxx . . $ wxDynamicBitmap#(panel, ID_DICE1cxx . . $ main_frame/ID_DICE1. + i, |
| 261 | bitmap_dicecxx . . $ main_frame/MainFrame#bitmap_dice.[i]), 0, wxALIGN_CENTERcxx . . $ wxALIGN_CENTER.); |
| 262 | box_sizer->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxCheckBoxcxx . . $ wxCheckBox#(panel, ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP. + i, |
| 263 | wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Keep")), 0, wxALIGN_CENTERcxx . . $ wxALIGN_CENTER.); |
| 264 | diceSizercxx . . $ main_frame/MainFrame#diceSizer.->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(box_sizer); |
| 265 | diceSizercxx . . $ main_frame/MainFrame#diceSizer.->Addcxx . . $ wxSizer#Add(6ba8f39d9a6b2465).(10, 10); |
| 266 | } |
| 267 | diceSizercxx . . $ main_frame/MainFrame#diceSizer.->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(new wxButtoncxx . . $ wxButton#(panel, ID_ROLLcxx . . $ main_frame/ID_ROLL., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Roll!"), |
| 268 | wxDefaultPositioncxx . . $ wxDefaultPosition., wxSizecxx . . $ wxSize#wxSize(3e454b8ccf442868).(64,64)), 0, wxALLcxx . . $ wxALL.); |
| 269 | |
| 270 | topSizer->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(sectionsSizercxx . . $ main_frame/MainFrame#sectionsSizer.); |
| 271 | topSizer->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(diceSizercxx . . $ main_frame/MainFrame#diceSizer., 0, wxALLcxx . . $ wxALL., 5); |
| 272 | |
| 273 | AdjustFrameSizecxx . . $ main_frame/MainFrame#AdjustFrameSize(5dd0f8059e1f410a).(topSizer); |
| 274 | |
| 275 | #if (wxMAJOR_VERSIONcxx . . $ `<external>/2951102437169020645/version.h:28:9`! == 2 && wxMINOR_VERSIONcxx . . $ `<external>/2951102437169020645/version.h:29:9`! == 8 && defined __WXGTK__cxx . . $ `<built-in>:455:9`!) |
| 276 | if (!m_menuBarHeight) { |
| 277 | // This checks for the bug in Ubuntu with wxGTK-2.8 where the |
| 278 | // menu-bar only appears after OnInternalIdle() event has been |
| 279 | // called. This results in wrong size calculation for the |
| 280 | // window, so we reserve additional space for the menu bar so |
| 281 | // when it appears it won't push the bottom of the window |
| 282 | // outside the boundary. |
| 283 | wxSize suggested_window_size = ClientToWindowSize(topSizer->GetMinSize()); |
| 284 | suggested_window_size.SetHeight((GetMenuBar()->GetSize()).GetHeight() + |
| 285 | suggested_window_size.GetHeight()); |
| 286 | this->SetSize(suggested_window_size); |
| 287 | this->SetSizeHints(suggested_window_size, suggested_window_size); |
| 288 | } |
| 289 | #endif |
| 290 | } |
| 291 | |
| 292 | void MainFramecxx . . $ main_frame/MainFrame#::AdjustFrameSizecxx . . $ main_frame/MainFrame#AdjustFrameSize(5dd0f8059e1f410a).(wxSizercxx . . $ wxSizer# *sizer) |
| 293 | { |
| 294 | auto panel = (wxPanelcxx . . $ wxPanel#*)FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_PANELcxx . . $ main_frame/ID_PANEL.); |
| 295 | |
| 296 | panel->SetSizerAndFitcxx . . $ wxWindowBase#SetSizerAndFit(6b8f606b81107616).(sizer); |
| 297 | sizer->Fitcxx . . $ wxSizer#Fit(4445f0b382dd2d34).(this); |
| 298 | } |
| 299 | |
| 300 | /** |
| 301 | * Connects the tables to the event handlers |
| 302 | */ |
| 303 | void MainFramecxx . . $ main_frame/MainFrame#::ConnectEventTablecxx . . $ main_frame/MainFrame#ConnectEventTable(49f6e7a06ebc5aa8).() |
| 304 | { |
| 305 | //BEGIN connecting the menu items' events |
| 306 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(wxID_EXITcxx . . $ wxID_EXIT., wxEVT_COMMAND_MENU_SELECTEDcxx . . $ `<external>/9123237030240659982/event.h:4828:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(MainFrame::OnQuit)); |
| 307 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(wxID_ABOUTcxx . . $ wxID_ABOUT., wxEVT_COMMAND_MENU_SELECTEDcxx . . $ `<external>/9123237030240659982/event.h:4828:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(MainFrame::OnAbout)); |
| 308 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_HOWTOPLAYcxx . . $ main_frame/ID_HOWTOPLAY., wxEVT_COMMAND_MENU_SELECTEDcxx . . $ `<external>/9123237030240659982/event.h:4828:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(MainFrame::OnHelpMenuLink)); |
| 309 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_FAQcxx . . $ main_frame/ID_FAQ., wxEVT_COMMAND_MENU_SELECTEDcxx . . $ `<external>/9123237030240659982/event.h:4828:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(MainFrame::OnHelpMenuLink)); |
| 310 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_SENDCOMMENTcxx . . $ main_frame/ID_SENDCOMMENT., wxEVT_COMMAND_MENU_SELECTEDcxx . . $ `<external>/9123237030240659982/event.h:4828:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(MainFrame::OnSendComment)); |
| 311 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(wxID_NEWcxx . . $ wxID_NEW., wxEVT_COMMAND_MENU_SELECTEDcxx . . $ `<external>/9123237030240659982/event.h:4828:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(MainFrame::OnNewGame)); |
| 312 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(wxID_UNDOcxx . . $ wxID_UNDO., wxEVT_COMMAND_MENU_SELECTEDcxx . . $ `<external>/9123237030240659982/event.h:4828:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(MainFrame::OnUndo)); |
| 313 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_SHOWHIGHSCOREcxx . . $ main_frame/ID_SHOWHIGHSCORE., wxEVT_COMMAND_MENU_SELECTEDcxx . . $ `<external>/9123237030240659982/event.h:4828:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(MainFrame::OnShowHighscore)); |
| 314 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_SETTINGScxx . . $ main_frame/ID_SETTINGS., wxEVT_COMMAND_MENU_SELECTEDcxx . . $ `<external>/9123237030240659982/event.h:4828:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(MainFrame::OnSettings)); |
| 315 | //END connecting the menu items' events |
| 316 | |
| 317 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_ROLLcxx . . $ main_frame/ID_ROLL., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`! (MainFrame::DoubleRollLock)); |
| 318 | |
| 319 | //BEGIN connecting the scoreboard buttons to the events |
| 320 | Connectcxx . . $ wxEvtHandler#Connect(9d71c0b15f1fc2ba).(ID_ACEScxx . . $ main_frame/ID_ACES.,ID_SIXEScxx . . $ main_frame/ID_SIXES., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`! (MainFrame::OnUpperButtons)); |
| 321 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_THREEOFAKINDcxx . . $ main_frame/ID_THREEOFAKIND., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`! (MainFrame::On3ofakindButton)); |
| 322 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_FOUROFAKINDcxx . . $ main_frame/ID_FOUROFAKIND., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`! (MainFrame::On4ofakindButton)); |
| 323 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_FULLHOUSEcxx . . $ main_frame/ID_FULLHOUSE., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`! (MainFrame::OnFullHouseButton)); |
| 324 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_SMALLSEQUENCEcxx . . $ main_frame/ID_SMALLSEQUENCE., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`! (MainFrame::OnSmallSequenceButton)); |
| 325 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_LARGESEQUENCEcxx . . $ main_frame/ID_LARGESEQUENCE., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`! (MainFrame::OnLargeSequenceButton)); |
| 326 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_YAHTZEEcxx . . $ main_frame/ID_YAHTZEE., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`! (MainFrame::OnYahtzeeButton)); |
| 327 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_CHANCEcxx . . $ main_frame/ID_CHANCE., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`! (MainFrame::OnChanceButton)); |
| 328 | Connectcxx . . $ wxEvtHandler#Connect(9d71c0b15f1fc2ba).(ID_DICE1cxx . . $ main_frame/ID_DICE1.,ID_DICE5cxx . . $ main_frame/ID_DICE5., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`! (MainFrame::OnDiceClick)); |
| 329 | Connectcxx . . $ wxEvtHandler#Connect(9d71c0b15f1fc2ba).(ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP.,ID_DICE5KEEPcxx . . $ main_frame/ID_DICE5KEEP., wxEVT_COMMAND_CHECKBOX_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4823:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`! (MainFrame::OnKeepClick)); |
| 330 | //END connecting the scoreboard buttons to the event |
| 331 | |
| 332 | /* The following code connects the on wxEVT_ENTER_WINDOW and |
| 333 | * wxEVT_LEAVE_WINDOW events to the score buttons to handle the score |
| 334 | * hints. For some unknown technical problem we have to directly connect |
| 335 | * the events, otherwise the wxEVT_LEAVE_WINDOW doesn't get generated. |
| 336 | * We have to use event handler other than MainFrame's as the regular |
| 337 | * event handler leads to segmantation fault. |
| 338 | */ |
| 339 | wxButtoncxx . . $ wxButton# *temp; |
| 340 | for (int i = ID_ACEScxx . . $ main_frame/ID_ACES.; i<=ID_CHANCEcxx . . $ main_frame/ID_CHANCE.; i++) { |
| 341 | temp = ((wxButtoncxx . . $ wxButton# *)FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i)); |
| 342 | temp->Connectcxx . . $ wxEvtHandler#Connect(6ae291db4cb406b2).(wxEVT_LEAVE_WINDOWcxx . . $ wxEVT_LEAVE_WINDOW., wxMouseEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4286:9`!(MainFrameEvtHandler::OnScoreMouseLeave), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, m_evt_handlercxx . . $ main_frame/MainFrame#m_evt_handler.); |
| 343 | temp->Connectcxx . . $ wxEvtHandler#Connect(6ae291db4cb406b2).(wxEVT_ENTER_WINDOWcxx . . $ wxEVT_ENTER_WINDOW., wxMouseEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4286:9`!(MainFrameEvtHandler::OnScoreMouseEnter), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, m_evt_handlercxx . . $ main_frame/MainFrame#m_evt_handler.); |
| 344 | } |
| 345 | } |
| 346 | |
| 347 | |
| 348 | /*********EVENT PROCCESSING FUNCTIONS********/ |
| 349 | |
| 350 | void MainFramecxx . . $ main_frame/MainFrame#::OnAboutcxx . . $ main_frame/MainFrame#OnAbout(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 351 | { |
| 352 | aboutcxx . . $ about/::AboutDialogcxx . . $ about/AboutDialog# *about = new aboutcxx . . $ about/::AboutDialogcxx . . $ about/AboutDialog#(this); |
| 353 | about->ShowModalcxx . . $ wxDialog#ShowModal(b126dc7c1de90089).(); |
| 354 | delete about; |
| 355 | } |
| 356 | |
| 357 | void MainFramecxx . . $ main_frame/MainFrame#::OnHelpMenuLinkcxx . . $ main_frame/MainFrame#OnHelpMenuLink(f55e5a77ec619b42). (wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 358 | { |
| 359 | wxStringcxx . . $ wxString# linkcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 360 | switch (event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()) { |
| 361 | case ID_HOWTOPLAYcxx . . $ main_frame/ID_HOWTOPLAY.: |
| 362 | link =cxx . . $ wxString#`operator=`(5e44a138b86cc9f6). wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("http://www.openyahtzee.org/wiki/HowToPlay"); |
| 363 | break; |
| 364 | case ID_FAQcxx . . $ main_frame/ID_FAQ.: |
| 365 | link =cxx . . $ wxString#`operator=`(5e44a138b86cc9f6). wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("http://www.openyahtzee.org/wiki/FAQ"); |
| 366 | break; |
| 367 | } |
| 368 | |
| 369 | wxLaunchDefaultBrowsercxx . . $ wxLaunchDefaultBrowser(e1ba1755b00e8671).(link); |
| 370 | } |
| 371 | |
| 372 | |
| 373 | /** |
| 374 | * Starts up the user browser and connects to the Open Yahtzee website's |
| 375 | * feedback page. |
| 376 | * \param event |
| 377 | */ |
| 378 | void MainFramecxx . . $ main_frame/MainFrame#::OnSendCommentcxx . . $ main_frame/MainFrame#OnSendComment(f55e5a77ec619b42). (wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 379 | { |
| 380 | wxStringcxx . . $ wxString# linkcxx . . $ wxString#wxString(c410f49fea108c7d). = wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("http://www.guyrutenberg.com/contact-me"); |
| 381 | |
| 382 | wxLaunchDefaultBrowsercxx . . $ wxLaunchDefaultBrowser(e1ba1755b00e8671).(link); |
| 383 | } |
| 384 | |
| 385 | void MainFramecxx . . $ main_frame/MainFrame#::OnQuitcxx . . $ main_frame/MainFrame#OnQuit(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 386 | { |
| 387 | // Destroy the frame |
| 388 | Closecxx . . $ wxWindowBase#Close(efaadfb7dc14930a).(); |
| 389 | } |
| 390 | |
| 391 | /** |
| 392 | * This is the event handler of the New Game menu item. It starts a new |
| 393 | * game and clears the board from the last game. |
| 394 | * \param event |
| 395 | */ |
| 396 | void MainFramecxx . . $ main_frame/MainFrame#::OnNewGamecxx . . $ main_frame/MainFrame#OnNewGame(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 397 | { |
| 398 | //disable the undo button so it won't be enabled when a new game is started. |
| 399 | (GetMenuBarcxx . . $ wxFrameBase#GetMenuBar(f8cc4cf0e2c6581c).()->FindItemcxx . . $ wxMenuBar#FindItem(6de9ae6c79736abe).(wxID_UNDOcxx . . $ wxID_UNDO.))->Enablecxx . . $ wxMenuItem#Enable(b45ddcbc8423892c).(false); |
| 400 | |
| 401 | ResetRollscxx . . $ main_frame/MainFrame#ResetRolls(49f6e7a06ebc5aa8).(); |
| 402 | m_yahtzeecxx . . $ main_frame/MainFrame#m_yahtzee. = false; |
| 403 | m_numofplaysleftcxx . . $ main_frame/MainFrame#m_numofplaysleft. = 13; |
| 404 | |
| 405 | for (int i = ID_ACESTEXTcxx . . $ main_frame/ID_ACESTEXT.; i<= ID_GRANDTOTALcxx . . $ main_frame/ID_GRANDTOTAL.; i++) |
| 406 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i))->Clearcxx . . $ wxTextEntryBase#Clear(49f6e7a06ebc5aa8).(); |
| 407 | for (int i = ID_ACEScxx . . $ main_frame/ID_ACES.; i<= ID_CHANCEcxx . . $ main_frame/ID_CHANCE.; i++) |
| 408 | ((wxButtoncxx . . $ wxButton#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i))->Enablecxx . . $ wxWindowBase#Enable(efaadfb7dc14930a).(true); |
| 409 | } |
| 410 | |
| 411 | /** |
| 412 | * This function handles the undo events. It's connected to the Undo menu item. |
| 413 | * |
| 414 | * Note that the function only allows undoing of scoring actions and not dice |
| 415 | * rolls. Also it won't allow the undoing of the last move of the game because |
| 416 | * of a technical problem relating to the case an high-score was made and then |
| 417 | * the user undo the last move and rescore another high-score and so on. |
| 418 | * \param event |
| 419 | */ |
| 420 | void MainFramecxx . . $ main_frame/MainFrame#::OnUndocxx . . $ main_frame/MainFrame#OnUndo(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 421 | { |
| 422 | m_rollscxx . . $ main_frame/MainFrame#m_rolls. = m_rollsundocxx . . $ main_frame/MainFrame#m_rollsundo.; |
| 423 | |
| 424 | //after the user scored the button was enabled, check if it should be disabled |
| 425 | if (m_rollscxx . . $ main_frame/MainFrame#m_rolls. <= 0) //we don't have remaining rolls |
| 426 | ((wxButtoncxx . . $ wxButton#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_ROLLcxx . . $ main_frame/ID_ROLL.)) -> Enablecxx . . $ wxWindowBase#Enable(efaadfb7dc14930a).(false); |
| 427 | |
| 428 | // change the displayed roll counter |
| 429 | wxStringcxx . . $ wxString# caption = wxStringcxx . . $ wxString#wxString(c410f49fea108c7d).::Formatcxx . . $ wxString#Format(790352b8134174a2).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Roll! (%hi)"),m_rollscxx . . $ main_frame/MainFrame#m_rolls.); |
| 430 | FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_ROLLcxx . . $ main_frame/ID_ROLL.)->SetLabelcxx . . $ wxWindow#SetLabel(eec3608749d303b4).(caption); |
| 431 | |
| 432 | //restore the 'keep' checkboxes |
| 433 | for (int i=0; i<5; i++) |
| 434 | ((wxCheckBoxcxx . . $ wxCheckBox#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i + ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP.)) -> Enablecxx . . $ wxWindowBase#Enable(efaadfb7dc14930a).(true); |
| 435 | |
| 436 | //reset the users last choice |
| 437 | FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(m_lastmovecxx . . $ main_frame/MainFrame#m_lastmove.)->Enablecxx . . $ wxWindowBase#Enable(efaadfb7dc14930a).(true); |
| 438 | |
| 439 | //clear the score; |
| 440 | ((wxTextCtrlcxx . . $ wxTextCtrl#*)FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_ACESTEXTcxx . . $ main_frame/ID_ACESTEXT. + (m_lastmovecxx . . $ main_frame/MainFrame#m_lastmove. - ID_ACEScxx . . $ main_frame/ID_ACES.)))->SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("")); |
| 441 | |
| 442 | //Undo the Yahtzee flag if needed |
| 443 | if (m_lastmovecxx . . $ main_frame/MainFrame#m_lastmove. == ID_YAHTZEEcxx . . $ main_frame/ID_YAHTZEE.) { |
| 444 | m_yahtzeecxx . . $ main_frame/MainFrame#m_yahtzee. = false; |
| 445 | } |
| 446 | |
| 447 | //undo also the yahtzee bonus if needed |
| 448 | if (m_yahtzeebonuscxx . . $ main_frame/MainFrame#m_yahtzeebonus.) { |
| 449 | wxStringcxx . . $ wxString# tempstrcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 450 | |
| 451 | tempstr =cxx . . $ wxString#`operator=`(112791f5da12414c). ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_YAHTZEEBONUSTEXTcxx . . $ main_frame/ID_YAHTZEEBONUSTEXT.)) -> GetValuecxx . . $ wxTextCtrl#GetValue(fd613287981dc2d5).(); |
| 452 | tempstr.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%li"), strtolcxx . . $ strtol(44bbb87609b212fc).(tempstr.mb_strcxx . . $ wxString#mb_str(3e6bfa20c9be5f9e).(), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 10) - 100); |
| 453 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_YAHTZEEBONUSTEXTcxx . . $ main_frame/ID_YAHTZEEBONUSTEXT.)) -> SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(tempstr); |
| 454 | } |
| 455 | |
| 456 | //recalculate the subtotals |
| 457 | CalculateSubTotalcxx . . $ main_frame/MainFrame#CalculateSubTotal(49f6e7a06ebc5aa8).(); |
| 458 | |
| 459 | (GetMenuBarcxx . . $ wxFrameBase#GetMenuBar(f8cc4cf0e2c6581c).()->FindItemcxx . . $ wxMenuBar#FindItem(6de9ae6c79736abe).(wxID_UNDOcxx . . $ wxID_UNDO.))->Enablecxx . . $ wxMenuItem#Enable(b45ddcbc8423892c).(false); |
| 460 | //cancel the counting for the choice that was canceled |
| 461 | m_numofplaysleftcxx . . $ main_frame/MainFrame#m_numofplaysleft.++; |
| 462 | } |
| 463 | |
| 464 | /** |
| 465 | * This function enables the undo button and stores the last move |
| 466 | * \param id |
| 467 | */ |
| 468 | inline void MainFramecxx . . $ main_frame/MainFrame#::EnableUndocxx . . $ main_frame/MainFrame#EnableUndo(d4f767463ce0a6b3).(int id) |
| 469 | { |
| 470 | if (m_numofplaysleftcxx . . $ main_frame/MainFrame#m_numofplaysleft.) { |
| 471 | (GetMenuBarcxx . . $ wxFrameBase#GetMenuBar(f8cc4cf0e2c6581c).()->FindItemcxx . . $ wxMenuBar#FindItem(6de9ae6c79736abe).(wxID_UNDOcxx . . $ wxID_UNDO.))->Enablecxx . . $ wxMenuItem#Enable(b45ddcbc8423892c).(true); |
| 472 | m_lastmovecxx . . $ main_frame/MainFrame#m_lastmove. = id; |
| 473 | } |
| 474 | } |
| 475 | |
| 476 | /** |
| 477 | * Shows the high-score dialog. Connected to the Game->"Show High Score" menu item. |
| 478 | * \param event |
| 479 | */ |
| 480 | void MainFramecxx . . $ main_frame/MainFrame#::OnShowHighscorecxx . . $ main_frame/MainFrame#OnShowHighscore(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 481 | { |
| 482 | highscores_dialogcxx . . $ highscores_dialog/::HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog# *dialog = new highscores_dialogcxx . . $ highscores_dialog/::HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog#(this, m_configcxx . . $ main_frame/MainFrame#m_config..getcxx . . $ boost/scoped_ptr#get(5a2a78a048fb49a8).()); |
| 483 | |
| 484 | dialog->ShowModalcxx . . $ wxDialog#ShowModal(b126dc7c1de90089).(); |
| 485 | |
| 486 | delete dialog; |
| 487 | } |
| 488 | |
| 489 | /** |
| 490 | * Shows the settings dialog. This event-handler is connected to Game->Settings |
| 491 | * menu item. |
| 492 | * \param event |
| 493 | */ |
| 494 | void MainFramecxx . . $ main_frame/MainFrame#::OnSettingscxx . . $ main_frame/MainFrame#OnSettings(f55e5a77ec619b42).( wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 495 | { |
| 496 | settings_dialogcxx . . $ settings_dialog/::SettingsDialogcxx . . $ settings_dialog/SettingsDialog#* settings_dialog = new settings_dialogcxx . . $ settings_dialog/::SettingsDialogcxx . . $ settings_dialog/SettingsDialog#(this, m_configcxx . . $ main_frame/MainFrame#m_config..getcxx . . $ boost/scoped_ptr#get(5a2a78a048fb49a8).()); |
| 497 | |
| 498 | if (settings_dialog->ShowModalcxx . . $ wxDialog#ShowModal(b126dc7c1de90089).()!=wxID_OKcxx . . $ wxID_OK.) { |
| 499 | delete settings_dialog; |
| 500 | return; |
| 501 | } |
| 502 | |
| 503 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_UPPERSECTIONTOTALcxx . . $ main_frame/ID_UPPERSECTIONTOTAL.)) -> SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("")); |
| 504 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_LOWERTOTALcxx . . $ main_frame/ID_LOWERTOTAL.)) -> SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("")); |
| 505 | CalculateSubTotalcxx . . $ main_frame/MainFrame#CalculateSubTotal(49f6e7a06ebc5aa8).(); |
| 506 | |
| 507 | Relayoutcxx . . $ main_frame/MainFrame#Relayout(49f6e7a06ebc5aa8).(); |
| 508 | |
| 509 | delete settings_dialog; |
| 510 | } |
| 511 | |
| 512 | /** |
| 513 | * Event handler for the Roll button. It checks the settings if it should |
| 514 | * animate the dice and then rolls them accordingly. It also checks for the |
| 515 | * status of the "keep" checkboxes. |
| 516 | * \param event |
| 517 | */ |
| 518 | void MainFramecxx . . $ main_frame/MainFrame#::OnRollButtoncxx . . $ main_frame/MainFrame#OnRollButton(49f6e7a06ebc5aa8). () |
| 519 | { |
| 520 | short int dice[5]; //holds the dices score |
| 521 | |
| 522 | static stdcxx . . $ std/::mt19937cxx . . $ std/mt19937#::result_typecxx . . $ std/mersenne_twister_engine#result_type# seed = stdcxx . . $ std/::chronocxx . . $ std/chrono/::high_resolution_clockcxx . . $ std/chrono/_V2/high_resolution_clock#::nowcxx . . $ std/chrono/_V2/system_clock#now(acb7c844e4d83bb).().time_since_epochcxx . . $ std/chrono/time_point#time_since_epoch(7b7646ca7c721626).().countcxx . . $ std/chrono/duration#count(8f5363d873dd4781).(); |
| 523 | static auto dice_rand = stdcxx . . $ std/_Bind#_Bind(2de50c68877ed2b5).::bindcxx . . $ std/bind(872fd79d47452673).(stdcxx . . $ std/uniform_int_distribution#uniform_int_distribution(249673c20e2b8d5).::uniform_int_distributioncxx . . $ std/uniform_int_distribution#<int>(1,6), |
| 524 | stdcxx . . $ std/::mt19937cxx . . $ std/mt19937#(seed)); |
| 525 | static auto num_throws_rand = stdcxx . . $ std/_Bind#_Bind(2de50c68877ed2b5).::bindcxx . . $ std/bind(872fd79d47452673).(stdcxx . . $ std/uniform_int_distribution#uniform_int_distribution(249673c20e2b8d5).::uniform_int_distributioncxx . . $ std/uniform_int_distribution#<int>(5,18), |
| 526 | stdcxx . . $ std/::mt19937cxx . . $ std/mt19937#(seed * 0x101010101)); |
| 527 | |
| 528 | // fill the dice array with the old values |
| 529 | int dice_throws[5]; |
| 530 | for (int i = 0 ; i < 5; ++i) { |
| 531 | dice[i]=m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..GetDicecxx . . $ ScoreDice#GetDice(14a1761c3ef4450f).(i+1); |
| 532 | dice_throws[i] = 0; |
| 533 | if ( ((wxCheckBoxcxx . . $ wxCheckBox#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i + ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP.))->IsCheckedcxx . . $ wxCheckBoxBase#IsChecked(50ce9a9e25b4a850).() ) { |
| 534 | dice_throws[i] = 0; |
| 535 | } else { |
| 536 | dice_throws[i] = 1; |
| 537 | if (m_configcxx . . $ main_frame/MainFrame#m_config.->cxx . . $ boost/scoped_ptr#`operator->`(5a2a78a048fb49a8).getcxx . . $ configuration/Configuration#get(24764cae04130674).("dice-animation"cxx . . $ std/__cxx11/basic_string#basic_string(3bc0f77cdfbaa67f).) ==cxx . . $ std/`operator==`(4b17aa87c9f300c6). "True") { |
| 538 | dice_throws[i] = num_throws_rand(cxx . . $ std/_Bind#`operator()`(3fee5b8f60042e8a).); |
| 539 | } |
| 540 | } |
| 541 | } |
| 542 | |
| 543 | while (dice_throws[0] || dice_throws[1] || dice_throws[2] || dice_throws[3] || dice_throws[4]) { |
| 544 | for (int i=0 ; i<5; i++){ |
| 545 | if(dice_throws[i]){ |
| 546 | dice_throws[i]--; |
| 547 | dice[i] = dice_rand(cxx . . $ std/_Bind#`operator()`(3fee5b8f60042e8a).); |
| 548 | ((wxDynamicBitmapcxx . . $ wxDynamicBitmap#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i + |
| 549 | ID_DICE1cxx . . $ main_frame/ID_DICE1.)) -> SetBitmapcxx . . $ wxDynamicBitmap#SetBitmap(5b5686b4f88e80eb).( |
| 550 | bitmap_dicecxx . . $ main_frame/MainFrame#bitmap_dice.[dice[i]-1]); |
| 551 | } |
| 552 | } |
| 553 | if (m_configcxx . . $ main_frame/MainFrame#m_config.->cxx . . $ boost/scoped_ptr#`operator->`(5a2a78a048fb49a8).getcxx . . $ configuration/Configuration#get(24764cae04130674).("dice-animation"cxx . . $ std/__cxx11/basic_string#basic_string(3bc0f77cdfbaa67f).)==cxx . . $ std/`operator==`(4b17aa87c9f300c6)."True") { |
| 554 | wxMilliSleepcxx . . $ wxMilliSleep(2c44cd906ae4e829).(100); |
| 555 | } |
| 556 | } |
| 557 | |
| 558 | m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..SetDicecxx . . $ ScoreDice#SetDice(38b7dc26feddae40).(dice); |
| 559 | m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..SetYahtzeeJokercxx . . $ ScoreDice#SetYahtzeeJoker(b45ddcbc8423892c).(YahtzeeJokercxx . . $ main_frame/MainFrame#YahtzeeJoker(c9857a73d68e59ba).()); |
| 560 | --m_rollscxx . . $ main_frame/MainFrame#m_rolls.; |
| 561 | |
| 562 | // change the displayed roll counter |
| 563 | wxStringcxx . . $ wxString# caption = wxStringcxx . . $ wxString#wxString(c410f49fea108c7d).::Formatcxx . . $ wxString#Format(790352b8134174a2).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Roll! (%hi)"),m_rollscxx . . $ main_frame/MainFrame#m_rolls.); |
| 564 | FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_ROLLcxx . . $ main_frame/ID_ROLL.)->SetLabelcxx . . $ wxWindow#SetLabel(eec3608749d303b4).(caption); |
| 565 | |
| 566 | #ifndef DEBUG |
| 567 | if (m_rollscxx . . $ main_frame/MainFrame#m_rolls. <= 0) { |
| 568 | ((wxButtoncxx . . $ wxButton#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_ROLLcxx . . $ main_frame/ID_ROLL.)) -> Enablecxx . . $ wxWindowBase#Enable(efaadfb7dc14930a).(false); |
| 569 | FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_ROLLcxx . . $ main_frame/ID_ROLL.)->SetLabelcxx . . $ wxWindow#SetLabel(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Roll!")); |
| 570 | } |
| 571 | |
| 572 | #endif |
| 573 | |
| 574 | //enable the keep checkboxes |
| 575 | for (int i=0; i<5; i++) |
| 576 | ((wxCheckBoxcxx . . $ wxCheckBox#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i + ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP.)) -> Enablecxx . . $ wxWindowBase#Enable(efaadfb7dc14930a).(true); |
| 577 | |
| 578 | //we rolled the dices so undoing isn't allowed |
| 579 | (GetMenuBarcxx . . $ wxFrameBase#GetMenuBar(f8cc4cf0e2c6581c).()->FindItemcxx . . $ wxMenuBar#FindItem(6de9ae6c79736abe).(wxID_UNDOcxx . . $ wxID_UNDO.))->Enablecxx . . $ wxMenuItem#Enable(b45ddcbc8423892c).(false); |
| 580 | m_yahtzeebonuscxx . . $ main_frame/MainFrame#m_yahtzeebonus. = false; //if we scored yahtzee bonus before we don't care anymore. |
| 581 | } |
| 582 | |
| 583 | void MainFramecxx . . $ main_frame/MainFrame#::DoubleRollLockcxx . . $ main_frame/MainFrame#DoubleRollLock(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 584 | { |
| 585 | /* The function works by connecting to idle event, and raising a |
| 586 | * flag when it process a valid click on the Roll button. When the |
| 587 | * another click happens and the flag is up, it means it is |
| 588 | * accidental. When the idle events is triggered it means that we |
| 589 | * no longer roll the dice, so we lower the flag. |
| 590 | */ |
| 591 | static bool skip_roll = false; |
| 592 | if (event.GetEventTypecxx . . $ wxEvent#GetEventType(455f465bc33b4cdf).() == wxEVT_IDLEcxx . . $ wxEVT_IDLE.) { |
| 593 | skip_roll = false; |
| 594 | Disconnectcxx . . $ wxEvtHandler#Disconnect(d04d3f1e4d94766a).(wxEVT_IDLEcxx . . $ wxEVT_IDLE., wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(MainFrame::DoubleRollLock)); |
| 595 | return; |
| 596 | } |
| 597 | |
| 598 | if (skip_roll) |
| 599 | return; |
| 600 | skip_roll = true; |
| 601 | |
| 602 | Connectcxx . . $ wxEvtHandler#Connect(6ae291db4cb406b2).(wxEVT_IDLEcxx . . $ wxEVT_IDLE., wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(MainFrame::DoubleRollLock)); |
| 603 | OnRollButtoncxx . . $ main_frame/MainFrame#OnRollButton(49f6e7a06ebc5aa8).(); |
| 604 | } |
| 605 | |
| 606 | /** |
| 607 | * This is the event-handler for all of the scoring buttons of the upper section. |
| 608 | * |
| 609 | * It gets the id of the button that called the event handler by comparing it |
| 610 | * to the id of the aces button it figures what button was pressed, And updates |
| 611 | * the suiting score textbox (again by comparing the id to the one of the aces |
| 612 | * checbox). |
| 613 | * \param event |
| 614 | */ |
| 615 | void MainFramecxx . . $ main_frame/MainFrame#::OnUpperButtonscxx . . $ main_frame/MainFrame#OnUpperButtons(f55e5a77ec619b42). (wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 616 | { |
| 617 | wxStringcxx . . $ wxString# outcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 618 | short int temp; |
| 619 | if (!IsValidClickcxx . . $ main_frame/MainFrame#IsValidClick(c9857a73d68e59ba).()) |
| 620 | return; |
| 621 | |
| 622 | YahtzeeBonuscxx . . $ main_frame/MainFrame#YahtzeeBonus(49f6e7a06ebc5aa8).(); |
| 623 | |
| 624 | switch(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()) { |
| 625 | case ID_ACEScxx . . $ main_frame/ID_ACES.: |
| 626 | temp = m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Acescxx . . $ ScoreDice#Aces(524863554b4a534e).(); |
| 627 | break; |
| 628 | case ID_TWOScxx . . $ main_frame/ID_TWOS.: |
| 629 | temp = m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Twoscxx . . $ ScoreDice#Twos(524863554b4a534e).(); |
| 630 | break; |
| 631 | case ID_THREEScxx . . $ main_frame/ID_THREES.: |
| 632 | temp = m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Threescxx . . $ ScoreDice#Threes(524863554b4a534e).(); |
| 633 | break; |
| 634 | case ID_FOURScxx . . $ main_frame/ID_FOURS.: |
| 635 | temp = m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Fourscxx . . $ ScoreDice#Fours(524863554b4a534e).(); |
| 636 | break; |
| 637 | case ID_FIVEScxx . . $ main_frame/ID_FIVES.: |
| 638 | temp = m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Fivescxx . . $ ScoreDice#Fives(524863554b4a534e).(); |
| 639 | break; |
| 640 | case ID_SIXEScxx . . $ main_frame/ID_SIXES.: |
| 641 | temp = m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Sixescxx . . $ ScoreDice#Sixes(524863554b4a534e).(); |
| 642 | break; |
| 643 | } |
| 644 | |
| 645 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"),temp); |
| 646 | wxTextCtrlcxx . . $ wxTextCtrl# *text_ctrl = dynamic_cast<wxTextCtrlcxx . . $ wxTextCtrl#*>(FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).() - ID_ACEScxx . . $ main_frame/ID_ACES. + ID_ACESTEXTcxx . . $ main_frame/ID_ACESTEXT.)); |
| 647 | text_ctrl->SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(out); |
| 648 | text_ctrl->SetForegroundColourcxx . . $ wxTextCtrl#SetForegroundColour(c4d9c5755b95f2b4).(wxNullColourcxx . . $ wxNullColour.); |
| 649 | text_ctrl->Refreshcxx . . $ wxWindow#Refresh(e1a781ccdc106755).(); |
| 650 | |
| 651 | PostScorecxx . . $ main_frame/MainFrame#PostScore(d4f767463ce0a6b3).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()); |
| 652 | } |
| 653 | |
| 654 | /** |
| 655 | * Event handler for the "3 of a kind" score button. |
| 656 | * \param event |
| 657 | */ |
| 658 | void MainFramecxx . . $ main_frame/MainFrame#::On3ofakindButtoncxx . . $ main_frame/MainFrame#On3ofakindButton(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 659 | { |
| 660 | if (!IsValidClickcxx . . $ main_frame/MainFrame#IsValidClick(c9857a73d68e59ba).()) |
| 661 | return; |
| 662 | |
| 663 | YahtzeeBonuscxx . . $ main_frame/MainFrame#YahtzeeBonus(49f6e7a06ebc5aa8).(); |
| 664 | wxStringcxx . . $ wxString# outcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 665 | |
| 666 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"),m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..ThreeOfAKindcxx . . $ ScoreDice#ThreeOfAKind(524863554b4a534e).()); |
| 667 | wxTextCtrlcxx . . $ wxTextCtrl# *text_ctrl = dynamic_cast<wxTextCtrlcxx . . $ wxTextCtrl#*>(FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_THREEOFAKINDTEXTcxx . . $ main_frame/ID_THREEOFAKINDTEXT.)); |
| 668 | text_ctrl->SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(out); |
| 669 | text_ctrl->SetForegroundColourcxx . . $ wxTextCtrl#SetForegroundColour(c4d9c5755b95f2b4).(wxNullColourcxx . . $ wxNullColour.); |
| 670 | text_ctrl->Refreshcxx . . $ wxWindow#Refresh(e1a781ccdc106755).(); |
| 671 | |
| 672 | PostScorecxx . . $ main_frame/MainFrame#PostScore(d4f767463ce0a6b3).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()); |
| 673 | } |
| 674 | |
| 675 | /** |
| 676 | * Event handler for the "4 of a kind" score button. |
| 677 | * \param event |
| 678 | */ |
| 679 | void MainFramecxx . . $ main_frame/MainFrame#::On4ofakindButtoncxx . . $ main_frame/MainFrame#On4ofakindButton(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 680 | { |
| 681 | if (!IsValidClickcxx . . $ main_frame/MainFrame#IsValidClick(c9857a73d68e59ba).()) |
| 682 | return; |
| 683 | |
| 684 | YahtzeeBonuscxx . . $ main_frame/MainFrame#YahtzeeBonus(49f6e7a06ebc5aa8).(); |
| 685 | wxStringcxx . . $ wxString# outcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 686 | |
| 687 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"),m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..FourOfAKindcxx . . $ ScoreDice#FourOfAKind(524863554b4a534e).()); |
| 688 | wxTextCtrlcxx . . $ wxTextCtrl# *text_ctrl = dynamic_cast<wxTextCtrlcxx . . $ wxTextCtrl#*>(FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_FOUROFAKINDTEXTcxx . . $ main_frame/ID_FOUROFAKINDTEXT.)); |
| 689 | text_ctrl->SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(out); |
| 690 | text_ctrl->SetForegroundColourcxx . . $ wxTextCtrl#SetForegroundColour(c4d9c5755b95f2b4).(wxNullColourcxx . . $ wxNullColour.); |
| 691 | text_ctrl->Refreshcxx . . $ wxWindow#Refresh(e1a781ccdc106755).(); |
| 692 | |
| 693 | PostScorecxx . . $ main_frame/MainFrame#PostScore(d4f767463ce0a6b3).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()); |
| 694 | } |
| 695 | |
| 696 | /** |
| 697 | * Event handler for the full-house score button. |
| 698 | * \param event |
| 699 | */ |
| 700 | void MainFramecxx . . $ main_frame/MainFrame#::OnFullHouseButtoncxx . . $ main_frame/MainFrame#OnFullHouseButton(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 701 | { |
| 702 | wxStringcxx . . $ wxString# outcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 703 | |
| 704 | if (!IsValidClickcxx . . $ main_frame/MainFrame#IsValidClick(c9857a73d68e59ba).()) |
| 705 | return; |
| 706 | |
| 707 | YahtzeeBonuscxx . . $ main_frame/MainFrame#YahtzeeBonus(49f6e7a06ebc5aa8).(); |
| 708 | |
| 709 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..FullHousecxx . . $ ScoreDice#FullHouse(524863554b4a534e).()); |
| 710 | wxTextCtrlcxx . . $ wxTextCtrl# *text_ctrl = dynamic_cast<wxTextCtrlcxx . . $ wxTextCtrl#*>(FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_FULLHOUSETEXTcxx . . $ main_frame/ID_FULLHOUSETEXT.)); |
| 711 | text_ctrl->SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(out); |
| 712 | text_ctrl->SetForegroundColourcxx . . $ wxTextCtrl#SetForegroundColour(c4d9c5755b95f2b4).(wxNullColourcxx . . $ wxNullColour.); |
| 713 | text_ctrl->Refreshcxx . . $ wxWindow#Refresh(e1a781ccdc106755).(); |
| 714 | |
| 715 | PostScorecxx . . $ main_frame/MainFrame#PostScore(d4f767463ce0a6b3).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()); |
| 716 | } |
| 717 | |
| 718 | /** |
| 719 | * Event handler for the small-sequence score button. |
| 720 | * \param event |
| 721 | */ |
| 722 | void MainFramecxx . . $ main_frame/MainFrame#::OnSmallSequenceButtoncxx . . $ main_frame/MainFrame#OnSmallSequenceButton(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 723 | { |
| 724 | wxStringcxx . . $ wxString# outcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 725 | |
| 726 | if (!IsValidClickcxx . . $ main_frame/MainFrame#IsValidClick(c9857a73d68e59ba).()) |
| 727 | return; |
| 728 | |
| 729 | YahtzeeBonuscxx . . $ main_frame/MainFrame#YahtzeeBonus(49f6e7a06ebc5aa8).(); |
| 730 | |
| 731 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..SmallSequencecxx . . $ ScoreDice#SmallSequence(524863554b4a534e).()); |
| 732 | wxTextCtrlcxx . . $ wxTextCtrl# *text_ctrl = dynamic_cast<wxTextCtrlcxx . . $ wxTextCtrl#*>(FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_SMALLSEQUENCETEXTcxx . . $ main_frame/ID_SMALLSEQUENCETEXT.)); |
| 733 | text_ctrl->SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(out); |
| 734 | text_ctrl->SetForegroundColourcxx . . $ wxTextCtrl#SetForegroundColour(c4d9c5755b95f2b4).(wxNullColourcxx . . $ wxNullColour.); |
| 735 | text_ctrl->Refreshcxx . . $ wxWindow#Refresh(e1a781ccdc106755).(); |
| 736 | |
| 737 | PostScorecxx . . $ main_frame/MainFrame#PostScore(d4f767463ce0a6b3).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()); |
| 738 | } |
| 739 | |
| 740 | /** |
| 741 | * Event handler for the large-sequence score button. |
| 742 | * \param event |
| 743 | */ |
| 744 | void MainFramecxx . . $ main_frame/MainFrame#::OnLargeSequenceButtoncxx . . $ main_frame/MainFrame#OnLargeSequenceButton(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 745 | { |
| 746 | wxStringcxx . . $ wxString# outcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 747 | |
| 748 | if (!IsValidClickcxx . . $ main_frame/MainFrame#IsValidClick(c9857a73d68e59ba).()) |
| 749 | return; |
| 750 | |
| 751 | YahtzeeBonuscxx . . $ main_frame/MainFrame#YahtzeeBonus(49f6e7a06ebc5aa8).(); |
| 752 | |
| 753 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..LargeSequencecxx . . $ ScoreDice#LargeSequence(524863554b4a534e).()); |
| 754 | wxTextCtrlcxx . . $ wxTextCtrl# *text_ctrl = dynamic_cast<wxTextCtrlcxx . . $ wxTextCtrl#*>(FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_LARGESEQUENCETEXTcxx . . $ main_frame/ID_LARGESEQUENCETEXT.)); |
| 755 | text_ctrl->SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(out); |
| 756 | text_ctrl->SetForegroundColourcxx . . $ wxTextCtrl#SetForegroundColour(c4d9c5755b95f2b4).(wxNullColourcxx . . $ wxNullColour.); |
| 757 | text_ctrl->Refreshcxx . . $ wxWindow#Refresh(e1a781ccdc106755).(); |
| 758 | |
| 759 | |
| 760 | PostScorecxx . . $ main_frame/MainFrame#PostScore(d4f767463ce0a6b3).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()); |
| 761 | } |
| 762 | |
| 763 | /** |
| 764 | * Event handler for the yahtzee score button. |
| 765 | * \param event |
| 766 | */ |
| 767 | void MainFramecxx . . $ main_frame/MainFrame#::OnYahtzeeButtoncxx . . $ main_frame/MainFrame#OnYahtzeeButton(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 768 | { |
| 769 | wxStringcxx . . $ wxString# outcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 770 | |
| 771 | if (!IsValidClickcxx . . $ main_frame/MainFrame#IsValidClick(c9857a73d68e59ba).()) |
| 772 | return; |
| 773 | |
| 774 | if (m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..IsYahtzeecxx . . $ ScoreDice#IsYahtzee(50ce9a9e25b4a850).()) m_yahtzeecxx . . $ main_frame/MainFrame#m_yahtzee. = true; |
| 775 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Yahtzeecxx . . $ ScoreDice#Yahtzee(524863554b4a534e).()); |
| 776 | wxTextCtrlcxx . . $ wxTextCtrl# *text_ctrl = dynamic_cast<wxTextCtrlcxx . . $ wxTextCtrl#*>(FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_YAHTZEETEXTcxx . . $ main_frame/ID_YAHTZEETEXT.)); |
| 777 | text_ctrl->SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(out); |
| 778 | text_ctrl->SetForegroundColourcxx . . $ wxTextCtrl#SetForegroundColour(c4d9c5755b95f2b4).(wxNullColourcxx . . $ wxNullColour.); |
| 779 | text_ctrl->Refreshcxx . . $ wxWindow#Refresh(e1a781ccdc106755).(); |
| 780 | |
| 781 | PostScorecxx . . $ main_frame/MainFrame#PostScore(d4f767463ce0a6b3).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()); |
| 782 | } |
| 783 | |
| 784 | /** |
| 785 | * Evnet handler for the chance score button. |
| 786 | * \param event |
| 787 | */ |
| 788 | void MainFramecxx . . $ main_frame/MainFrame#::OnChanceButtoncxx . . $ main_frame/MainFrame#OnChanceButton(f55e5a77ec619b42). (wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 789 | { |
| 790 | wxStringcxx . . $ wxString# outcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 791 | if (!IsValidClickcxx . . $ main_frame/MainFrame#IsValidClick(c9857a73d68e59ba).()) |
| 792 | return; |
| 793 | |
| 794 | YahtzeeBonuscxx . . $ main_frame/MainFrame#YahtzeeBonus(49f6e7a06ebc5aa8).(); |
| 795 | |
| 796 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"),m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Chancecxx . . $ ScoreDice#Chance(524863554b4a534e).()); |
| 797 | wxTextCtrlcxx . . $ wxTextCtrl# *text_ctrl = dynamic_cast<wxTextCtrlcxx . . $ wxTextCtrl#*>(FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_CHANCETEXTcxx . . $ main_frame/ID_CHANCETEXT.)); |
| 798 | text_ctrl->SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(out); |
| 799 | text_ctrl->SetForegroundColourcxx . . $ wxTextCtrl#SetForegroundColour(c4d9c5755b95f2b4).(wxNullColourcxx . . $ wxNullColour.); |
| 800 | text_ctrl->Refreshcxx . . $ wxWindow#Refresh(e1a781ccdc106755).(); |
| 801 | PostScorecxx . . $ main_frame/MainFrame#PostScore(d4f767463ce0a6b3).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()); |
| 802 | } |
| 803 | |
| 804 | /** |
| 805 | * Event handler for mouse clicks on the dice. |
| 806 | * |
| 807 | * When clicking on the dice this event-handler ticks the appropriate "keep" checkbox. |
| 808 | * \param event |
| 809 | */ |
| 810 | void MainFramecxx . . $ main_frame/MainFrame#::OnDiceClickcxx . . $ main_frame/MainFrame#OnDiceClick(f55e5a77ec619b42). (wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 811 | { |
| 812 | //tick the checkbox |
| 813 | if (((wxCheckBoxcxx . . $ wxCheckBox#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()-ID_DICE1cxx . . $ main_frame/ID_DICE1. + ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP.))->IsEnabledcxx . . $ wxWindowBase#IsEnabled(50ce9a9e25b4a850).()){ |
| 814 | bool newvalue = (((wxCheckBoxcxx . . $ wxCheckBox#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()-ID_DICE1cxx . . $ main_frame/ID_DICE1. + ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP.))->GetValuecxx . . $ wxCheckBox#GetValue(50ce9a9e25b4a850).())?false:true; |
| 815 | ((wxCheckBoxcxx . . $ wxCheckBox#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()-ID_DICE1cxx . . $ main_frame/ID_DICE1. + ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP.)) -> SetValuecxx . . $ wxCheckBox#SetValue(b45ddcbc8423892c).(newvalue); |
| 816 | } |
| 817 | |
| 818 | //dispatch a click event on the checkbox |
| 819 | wxCommandEventcxx . . $ wxCommandEvent# clickeventcxx . . $ wxCommandEvent#wxCommandEvent(3e454b8ccf442868).((event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()-ID_DICE1cxx . . $ main_frame/ID_DICE1. + ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP.),wxEVT_COMMAND_CHECKBOX_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4823:9`!); |
| 820 | clickevent.SetEventObjectcxx . . $ wxEvent#SetEventObject(8b80276450f090b2).( this ); |
| 821 | clickevent.SetIdcxx . . $ wxEvent#SetId(d4f767463ce0a6b3).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()-ID_DICE1cxx . . $ main_frame/ID_DICE1. + ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP.); |
| 822 | this->OnKeepClickcxx . . $ main_frame/MainFrame#OnKeepClick(f55e5a77ec619b42).(clickevent); ///\todo find a better way to call the event handler. |
| 823 | } |
| 824 | |
| 825 | void MainFramecxx . . $ main_frame/MainFrame#::OnKeepClickcxx . . $ main_frame/MainFrame#OnKeepClick(f55e5a77ec619b42). (wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 826 | { |
| 827 | wxCheckBoxcxx . . $ wxCheckBox# *temp = (wxCheckBoxcxx . . $ wxCheckBox#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()); |
| 828 | ((wxDynamicBitmapcxx . . $ wxDynamicBitmap#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(event.GetIdcxx . . $ wxEvent#GetId(455f465bc33b4cdf).()-ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP. + ID_DICE1cxx . . $ main_frame/ID_DICE1.))->SetGrayScalecxx . . $ wxDynamicBitmap#SetGrayScale(b45ddcbc8423892c).(temp->GetValuecxx . . $ wxCheckBox#GetValue(50ce9a9e25b4a850).()); |
| 829 | } |
| 830 | |
| 831 | |
| 832 | //******************************************** |
| 833 | //****** General Functions ****** |
| 834 | //******************************************** |
| 835 | |
| 836 | /** |
| 837 | * This function handles everything related to reseting the dice rolls after scoring. |
| 838 | */ |
| 839 | void MainFramecxx . . $ main_frame/MainFrame#::ResetRollscxx . . $ main_frame/MainFrame#ResetRolls(49f6e7a06ebc5aa8).() |
| 840 | { |
| 841 | m_rollsundocxx . . $ main_frame/MainFrame#m_rollsundo. = m_rollscxx . . $ main_frame/MainFrame#m_rolls.; |
| 842 | m_rollscxx . . $ main_frame/MainFrame#m_rolls. = 3; |
| 843 | ((wxButtoncxx . . $ wxButton#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_ROLLcxx . . $ main_frame/ID_ROLL.)) -> Enablecxx . . $ wxWindowBase#Enable(efaadfb7dc14930a).(true); |
| 844 | |
| 845 | // reset the roll count in the caption |
| 846 | FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_ROLLcxx . . $ main_frame/ID_ROLL.)->SetLabelcxx . . $ wxWindow#SetLabel(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Roll! (3)")); |
| 847 | for (int i=0; i<5; i++){ |
| 848 | ((wxCheckBoxcxx . . $ wxCheckBox#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i + ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP.)) -> SetValuecxx . . $ wxCheckBox#SetValue(b45ddcbc8423892c).(false); |
| 849 | ((wxCheckBoxcxx . . $ wxCheckBox#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i + ID_DICE1KEEPcxx . . $ main_frame/ID_DICE1KEEP.)) -> Enablecxx . . $ wxWindowBase#Enable(efaadfb7dc14930a).(false); |
| 850 | ((wxDynamicBitmapcxx . . $ wxDynamicBitmap#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i+ID_DICE1cxx . . $ main_frame/ID_DICE1.)) -> SetGrayScalecxx . . $ wxDynamicBitmap#SetGrayScale(b45ddcbc8423892c).(false); |
| 851 | } |
| 852 | } |
| 853 | |
| 854 | /** |
| 855 | * This function checks for a Yahtzee Bonus situation and if one exists it scores accordingly. |
| 856 | */ |
| 857 | void MainFramecxx . . $ main_frame/MainFrame#::YahtzeeBonuscxx . . $ main_frame/MainFrame#YahtzeeBonus(49f6e7a06ebc5aa8).() |
| 858 | { |
| 859 | wxStringcxx . . $ wxString# tempstrcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 860 | |
| 861 | //if the player didn't have any yathzees yet he can't have the bonus; |
| 862 | if (!m_yahtzeecxx . . $ main_frame/MainFrame#m_yahtzee.) |
| 863 | return; |
| 864 | if (m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..IsYahtzeecxx . . $ ScoreDice#IsYahtzee(50ce9a9e25b4a850).()) { |
| 865 | tempstr =cxx . . $ wxString#`operator=`(112791f5da12414c). ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_YAHTZEEBONUSTEXTcxx . . $ main_frame/ID_YAHTZEEBONUSTEXT.)) -> GetValuecxx . . $ wxTextCtrl#GetValue(fd613287981dc2d5).(); |
| 866 | tempstr.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%li"), strtolcxx . . $ strtol(44bbb87609b212fc).(tempstr.mb_strcxx . . $ wxString#mb_str(3e6bfa20c9be5f9e).(), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 10) + 100); |
| 867 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_YAHTZEEBONUSTEXTcxx . . $ main_frame/ID_YAHTZEEBONUSTEXT.)) -> SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(tempstr); |
| 868 | m_yahtzeebonuscxx . . $ main_frame/MainFrame#m_yahtzeebonus. = true; |
| 869 | } |
| 870 | } |
| 871 | |
| 872 | /** |
| 873 | * This function checks whether we have a Yahtzee Joker situation. |
| 874 | * \return true if there is Yahtzee Joker, false otherwise. |
| 875 | */ |
| 876 | bool MainFramecxx . . $ main_frame/MainFrame#::YahtzeeJokercxx . . $ main_frame/MainFrame#YahtzeeJoker(c9857a73d68e59ba).() |
| 877 | { |
| 878 | if (m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..IsYahtzeecxx . . $ ScoreDice#IsYahtzee(50ce9a9e25b4a850).() && !(FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_ACEScxx . . $ main_frame/ID_ACES. + |
| 879 | m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..GetDicecxx . . $ ScoreDice#GetDice(14a1761c3ef4450f).(1)-1)->IsEnabledcxx . . $ wxWindowBase#IsEnabled(50ce9a9e25b4a850).()) && |
| 880 | !(FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_YAHTZEEcxx . . $ main_frame/ID_YAHTZEE.)->IsEnabledcxx . . $ wxWindowBase#IsEnabled(50ce9a9e25b4a850).())) { |
| 881 | return true; |
| 882 | } |
| 883 | return false; |
| 884 | } |
| 885 | |
| 886 | /** |
| 887 | * This function handles the end of game. |
| 888 | * |
| 889 | * When a game ends it calculates the total score and submit it to the high |
| 890 | * score list. |
| 891 | */ |
| 892 | void MainFramecxx . . $ main_frame/MainFrame#::EndofGamecxx . . $ main_frame/MainFrame#EndofGame(49f6e7a06ebc5aa8).() |
| 893 | { |
| 894 | if(m_numofplaysleftcxx . . $ main_frame/MainFrame#m_numofplaysleft.>0) |
| 895 | return; |
| 896 | |
| 897 | wxStringcxx . . $ wxString# tempstrcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 898 | long upperscore = 0; |
| 899 | long lowerscore = 0; |
| 900 | |
| 901 | for (int i = ID_ACESTEXTcxx . . $ main_frame/ID_ACESTEXT.; i<=ID_SIXESTEXTcxx . . $ main_frame/ID_SIXESTEXT.; i++){ |
| 902 | tempstr =cxx . . $ wxString#`operator=`(112791f5da12414c). ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i)) -> GetValuecxx . . $ wxTextCtrl#GetValue(fd613287981dc2d5).(); |
| 903 | upperscore += strtolcxx . . $ strtol(44bbb87609b212fc).(tempstr.mb_strcxx . . $ wxString#mb_str(3e6bfa20c9be5f9e).(), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 10); |
| 904 | } |
| 905 | |
| 906 | tempstr.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%li"),upperscore); |
| 907 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_UPPERSECTIONTOTALcxx . . $ main_frame/ID_UPPERSECTIONTOTAL.)) -> SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(tempstr); |
| 908 | |
| 909 | //check for bonus |
| 910 | if(upperscore>=63) { |
| 911 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_BONUScxx . . $ main_frame/ID_BONUS.)) -> SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("35")); |
| 912 | upperscore +=35; |
| 913 | } else |
| 914 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_BONUScxx . . $ main_frame/ID_BONUS.)) -> SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("0")); |
| 915 | |
| 916 | tempstr.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%li"),upperscore); |
| 917 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_UPPERTOTALcxx . . $ main_frame/ID_UPPERTOTAL.)) -> SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(tempstr); |
| 918 | |
| 919 | //calculate total on lower section |
| 920 | for (int i = ID_THREEOFAKINDTEXTcxx . . $ main_frame/ID_THREEOFAKINDTEXT.; i<=ID_YAHTZEEBONUSTEXTcxx . . $ main_frame/ID_YAHTZEEBONUSTEXT.; i++) { |
| 921 | tempstr =cxx . . $ wxString#`operator=`(112791f5da12414c). ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i)) -> GetValuecxx . . $ wxTextCtrl#GetValue(fd613287981dc2d5).(); |
| 922 | lowerscore += strtolcxx . . $ strtol(44bbb87609b212fc).(tempstr.mb_strcxx . . $ wxString#mb_str(3e6bfa20c9be5f9e).(), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 10); |
| 923 | } |
| 924 | |
| 925 | tempstr.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%li"),lowerscore); |
| 926 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_LOWERTOTALcxx . . $ main_frame/ID_LOWERTOTAL.)) -> SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(tempstr); |
| 927 | tempstr.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%li"),upperscore + lowerscore); |
| 928 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_GRANDTOTALcxx . . $ main_frame/ID_GRANDTOTAL.)) -> SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(tempstr); |
| 929 | |
| 930 | //disable the roll button; |
| 931 | ((wxButtoncxx . . $ wxButton#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_ROLLcxx . . $ main_frame/ID_ROLL.)) -> Enablecxx . . $ wxWindowBase#Enable(efaadfb7dc14930a).(false); |
| 932 | |
| 933 | tempstr.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Your final score is %li points!"),lowerscore+upperscore); |
| 934 | wxMessageBoxcxx . . $ wxMessageBox(ecb3b78af7b1e8ff).(tempstr, wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Game Ended"), wxOKcxx . . $ `<external>/14689491191722134862/defs.h:1890:9`! | wxICON_INFORMATIONcxx . . $ `<external>/14689491191722134862/defs.h:1905:9`!, this); |
| 935 | |
| 936 | //submit to high score |
| 937 | HighScoreHandlercxx . . $ main_frame/MainFrame#HighScoreHandler(d4f767463ce0a6b3).(lowerscore+upperscore); |
| 938 | |
| 939 | } |
| 940 | |
| 941 | /** |
| 942 | * This function checks if a given score qualifies for the high score list and |
| 943 | * adds it to the list if it does. |
| 944 | * @param score The score submitted to the high score list. |
| 945 | */ |
| 946 | void MainFramecxx . . $ main_frame/MainFrame#::HighScoreHandlercxx . . $ main_frame/MainFrame#HighScoreHandler(d4f767463ce0a6b3).(int score) |
| 947 | { |
| 948 | stdcxx . . $ std/::stringcxx . . $ std/string# namecxx . . $ std/__cxx11/basic_string#basic_string(49f6e7a06ebc5aa8).,datecxx . . $ std/__cxx11/basic_string#basic_string(49f6e7a06ebc5aa8).; |
| 949 | wxCommandEventcxx . . $ wxCommandEvent# neweventcxx . . $ wxCommandEvent#wxCommandEvent(3e454b8ccf442868).; |
| 950 | |
| 951 | |
| 952 | if(!m_configcxx . . $ main_frame/MainFrame#m_config.->cxx . . $ boost/scoped_ptr#`operator->`(5a2a78a048fb49a8).isHighscorecxx . . $ configuration/Configuration#isHighscore(83c267b20bac841a).(score)) { |
| 953 | return; |
| 954 | } |
| 955 | |
| 956 | wxStringcxx . . $ wxString# msgcxx . . $ wxString#wxString(c410f49fea108c7d). = wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Your score made it to the high score table.\nPlease enter your name below:"); |
| 957 | |
| 958 | wxStringcxx . . $ wxString# last_name = wxStringcxx . . $ wxString#wxString(c410f49fea108c7d).::FromUTF8cxx . . $ wxString#FromUTF8(9bde915dfd6800d5).(m_configcxx . . $ main_frame/MainFrame#m_config.->cxx . . $ boost/scoped_ptr#`operator->`(5a2a78a048fb49a8).getcxx . . $ configuration/Configuration#get(24764cae04130674).("last-name"cxx . . $ std/__cxx11/basic_string#basic_string(3bc0f77cdfbaa67f).).c_strcxx . . $ std/__cxx11/basic_string#c_str(1016ee5406d91ab9).()); |
| 959 | |
| 960 | wxTextEntryDialogcxx . . $ wxTextEntryDialog# infodialogcxx . . $ wxTextEntryDialog#wxTextEntryDialog(2df953ab0bb7e790).(this,msg,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Please enter your name"),last_name ,wxOKcxx . . $ `<external>/14689491191722134862/defs.h:1890:9`! | wxCENTREcxx . . $ wxCENTRE.); |
| 961 | infodialog.ShowModalcxx . . $ wxDialog#ShowModal(b126dc7c1de90089).(); |
| 962 | |
| 963 | name =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). infodialog.GetValuecxx . . $ wxTextEntryDialog#GetValue(fd613287981dc2d5).().utf8_strcxx . . $ wxString#utf8_str(40909dc60c37c281).(); |
| 964 | m_configcxx . . $ main_frame/MainFrame#m_config.->cxx . . $ boost/scoped_ptr#`operator->`(5a2a78a048fb49a8).setcxx . . $ configuration/Configuration#set(f712b3a0dad3b1f).("last-name"cxx . . $ std/__cxx11/basic_string#basic_string(3bc0f77cdfbaa67f).,namecxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5).)->savecxx . . $ configuration/Configuration#save(49f6e7a06ebc5aa8).(); |
| 965 | |
| 966 | //get the date |
| 967 | wxDateTimecxx . . $ wxDateTime# now = wxDateTimecxx . . $ wxDateTime#::Nowcxx . . $ wxDateTime#Now(f9893d72564bbbe3).(); |
| 968 | date =cxx . . $ std/__cxx11/basic_string#`operator=`(978ca1133b5f6e74). now.FormatDatecxx . . $ wxDateTime#FormatDate(fd613287981dc2d5).().utf8_strcxx . . $ wxString#utf8_str(40909dc60c37c281).(); |
| 969 | date +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). " "; |
| 970 | date +=cxx . . $ std/__cxx11/basic_string#`operator+=`(978ca1133b5f6e74). now.FormatISOTimecxx . . $ wxDateTime#FormatISOTime(fd613287981dc2d5).().SubStringcxx . . $ wxString#SubString(cc1f835eb0cd2217).(0,4).utf8_strcxx . . $ wxString#utf8_str(40909dc60c37c281).(); |
| 971 | |
| 972 | int rank = m_configcxx . . $ main_frame/MainFrame#m_config.->cxx . . $ boost/scoped_ptr#`operator->`(5a2a78a048fb49a8).submitHighscorecxx . . $ configuration/Configuration#submitHighscore(79b7ed53d7e910d7).(score, namecxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5)., datecxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5).); |
| 973 | |
| 974 | //now show the high score table |
| 975 | highscores_dialogcxx . . $ highscores_dialog/::HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog# *dialog = new highscores_dialogcxx . . $ highscores_dialog/::HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog#(this, m_configcxx . . $ main_frame/MainFrame#m_config..getcxx . . $ boost/scoped_ptr#get(5a2a78a048fb49a8).(),rank); |
| 976 | |
| 977 | dialog->ShowModalcxx . . $ wxDialog#ShowModal(b126dc7c1de90089).(); |
| 978 | |
| 979 | delete dialog; |
| 980 | |
| 981 | } |
| 982 | |
| 983 | ///this function handles all the post scoring stuff such as disabling the right button. |
| 984 | /** |
| 985 | * This function is always called after scoring and it handles all the post-score |
| 986 | * stuff such as reseting the dice rolls, enabling the undo button, calculating |
| 987 | * the sub-total scores and ending the game if necessary. |
| 988 | * \param id |
| 989 | */ |
| 990 | void MainFramecxx . . $ main_frame/MainFrame#::PostScorecxx . . $ main_frame/MainFrame#PostScore(d4f767463ce0a6b3).(int id) |
| 991 | { |
| 992 | //now after the scoring reset the rolls |
| 993 | ResetRollscxx . . $ main_frame/MainFrame#ResetRolls(49f6e7a06ebc5aa8).(); |
| 994 | |
| 995 | CalculateSubTotalcxx . . $ main_frame/MainFrame#CalculateSubTotal(49f6e7a06ebc5aa8).(); |
| 996 | |
| 997 | //and disable the button |
| 998 | FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(id)->Enablecxx . . $ wxWindowBase#Enable(efaadfb7dc14930a).(false); |
| 999 | m_numofplaysleftcxx . . $ main_frame/MainFrame#m_numofplaysleft.--; |
| 1000 | EnableUndocxx . . $ main_frame/MainFrame#EnableUndo(d4f767463ce0a6b3).(id); |
| 1001 | EndofGamecxx . . $ main_frame/MainFrame#EndofGame(49f6e7a06ebc5aa8).(); |
| 1002 | } |
| 1003 | |
| 1004 | /** |
| 1005 | * This function calculates the sub-total scores and should be called after |
| 1006 | * every score. It does so only if this feature is requested in the settings |
| 1007 | * dialog. |
| 1008 | */ |
| 1009 | void MainFramecxx . . $ main_frame/MainFrame#::CalculateSubTotalcxx . . $ main_frame/MainFrame#CalculateSubTotal(49f6e7a06ebc5aa8).() |
| 1010 | { |
| 1011 | if (m_configcxx . . $ main_frame/MainFrame#m_config.->cxx . . $ boost/scoped_ptr#`operator->`(5a2a78a048fb49a8).getcxx . . $ configuration/Configuration#get(24764cae04130674).("calculate-subtotal"cxx . . $ std/__cxx11/basic_string#basic_string(3bc0f77cdfbaa67f).)==cxx . . $ std/`operator==`(4b17aa87c9f300c6)."False") |
| 1012 | return; |
| 1013 | long upperscore = 0; |
| 1014 | long lowerscore = 0; |
| 1015 | wxStringcxx . . $ wxString# tempstrcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 1016 | |
| 1017 | for (int i = ID_ACESTEXTcxx . . $ main_frame/ID_ACESTEXT.; i<=ID_SIXESTEXTcxx . . $ main_frame/ID_SIXESTEXT.; i++){ |
| 1018 | tempstr =cxx . . $ wxString#`operator=`(112791f5da12414c). ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i)) -> GetValuecxx . . $ wxTextCtrl#GetValue(fd613287981dc2d5).(); |
| 1019 | upperscore += strtolcxx . . $ strtol(44bbb87609b212fc).(tempstr.mb_strcxx . . $ wxString#mb_str(3e6bfa20c9be5f9e).(), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 10); |
| 1020 | } |
| 1021 | |
| 1022 | tempstr.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%li"),upperscore); |
| 1023 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_UPPERSECTIONTOTALcxx . . $ main_frame/ID_UPPERSECTIONTOTAL.)) -> SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(tempstr); |
| 1024 | if (upperscore >= 63) { |
| 1025 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_BONUScxx . . $ main_frame/ID_BONUS.))->SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("35")); |
| 1026 | } else { |
| 1027 | // this is needed in case of an undo |
| 1028 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_BONUScxx . . $ main_frame/ID_BONUS.))->SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("")); |
| 1029 | } |
| 1030 | |
| 1031 | for (int i = ID_THREEOFAKINDTEXTcxx . . $ main_frame/ID_THREEOFAKINDTEXT.; i<=ID_YAHTZEEBONUSTEXTcxx . . $ main_frame/ID_YAHTZEEBONUSTEXT.; i++) { |
| 1032 | tempstr =cxx . . $ wxString#`operator=`(112791f5da12414c). ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(i)) -> GetValuecxx . . $ wxTextCtrl#GetValue(fd613287981dc2d5).(); |
| 1033 | lowerscore += strtolcxx . . $ strtol(44bbb87609b212fc).(tempstr.mb_strcxx . . $ wxString#mb_str(3e6bfa20c9be5f9e).(), NULLcxx . . $ `/usr/lib/gcc/x86_64-linux-gnu/15/include/stddef.h:416:9`!, 10); |
| 1034 | } |
| 1035 | |
| 1036 | tempstr.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%li"),lowerscore); |
| 1037 | ((wxTextCtrlcxx . . $ wxTextCtrl#*) FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_LOWERTOTALcxx . . $ main_frame/ID_LOWERTOTAL.)) -> SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(tempstr); |
| 1038 | } |
| 1039 | |
| 1040 | |
| 1041 | |
| 1042 | void MainFramecxx . . $ main_frame/MainFrame#::Relayoutcxx . . $ main_frame/MainFrame#Relayout(49f6e7a06ebc5aa8).() |
| 1043 | { |
| 1044 | auto topSizer = (wxBoxSizercxx . . $ wxBoxSizer#*)FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(ID_PANELcxx . . $ main_frame/ID_PANEL.)->GetSizercxx . . $ wxWindowBase#GetSizer(dbebe6247d42815d).(); |
| 1045 | |
| 1046 | if (m_configcxx . . $ main_frame/MainFrame#m_config.->cxx . . $ boost/scoped_ptr#`operator->`(5a2a78a048fb49a8).getcxx . . $ configuration/Configuration#get(24764cae04130674).("horizontal-layout"cxx . . $ std/__cxx11/basic_string#basic_string(3bc0f77cdfbaa67f).)==cxx . . $ std/`operator==`(4b17aa87c9f300c6)."True") { |
| 1047 | topSizer->SetOrientationcxx . . $ wxBoxSizer#SetOrientation(d4f767463ce0a6b3).(wxVERTICALcxx . . $ wxVERTICAL.); |
| 1048 | sectionsSizercxx . . $ main_frame/MainFrame#sectionsSizer.->SetOrientationcxx . . $ wxBoxSizer#SetOrientation(d4f767463ce0a6b3).(wxHORIZONTALcxx . . $ wxHORIZONTAL.); |
| 1049 | diceSizercxx . . $ main_frame/MainFrame#diceSizer.->SetOrientationcxx . . $ wxBoxSizer#SetOrientation(d4f767463ce0a6b3).(wxHORIZONTALcxx . . $ wxHORIZONTAL.); |
| 1050 | } else { |
| 1051 | topSizer->SetOrientationcxx . . $ wxBoxSizer#SetOrientation(d4f767463ce0a6b3).(wxHORIZONTALcxx . . $ wxHORIZONTAL.); |
| 1052 | sectionsSizercxx . . $ main_frame/MainFrame#sectionsSizer.->SetOrientationcxx . . $ wxBoxSizer#SetOrientation(d4f767463ce0a6b3).(wxVERTICALcxx . . $ wxVERTICAL.); |
| 1053 | diceSizercxx . . $ main_frame/MainFrame#diceSizer.->SetOrientationcxx . . $ wxBoxSizer#SetOrientation(d4f767463ce0a6b3).(wxVERTICALcxx . . $ wxVERTICAL.); |
| 1054 | } |
| 1055 | |
| 1056 | AdjustFrameSizecxx . . $ main_frame/MainFrame#AdjustFrameSize(5dd0f8059e1f410a).(topSizer); |
| 1057 | stdcxx . . $ std/::cerrcxx . . $ std/cerr. <<cxx . . $ std/basic_ostream#`operator<<`(23b6575433a77e57). diceSizercxx . . $ main_frame/MainFrame#diceSizer.->GetSizecxx . . $ wxSizer#GetSize(1760195b8cec6c4e).().GetWidthcxx . . $ wxSize#GetWidth(455f465bc33b4cdf).() <<cxx . . $ std/basic_ostream#`operator<<`(f46f7e25851d787a). stdcxx . . $ std/::endlcxx . . $ std/endl(345bf97a19cc83a9).; |
| 1058 | } |
| 1059 | |
| 1060 | /** |
| 1061 | * Check whether the dice should be rolled or if the user already rolled them. |
| 1062 | * \return true if the dice are valid (rolled). |
| 1063 | */ |
| 1064 | bool MainFramecxx . . $ main_frame/MainFrame#::IsValidDicecxx . . $ main_frame/MainFrame#IsValidDice(c9857a73d68e59ba).() |
| 1065 | { |
| 1066 | if ( m_rollscxx . . $ main_frame/MainFrame#m_rolls. < 3 ) |
| 1067 | return true; |
| 1068 | return false; |
| 1069 | } |
| 1070 | |
| 1071 | /** |
| 1072 | * |
| 1073 | */ |
| 1074 | void MainFrameEvtHandlercxx . . $ main_frame/MainFrameEvtHandler#::OnScoreMouseEntercxx . . $ main_frame/MainFrameEvtHandler#OnScoreMouseEnter(7e6a1c70b0e99497). (wxMouseEventcxx . . $ wxMouseEvent#& event) |
| 1075 | { |
| 1076 | int id; |
| 1077 | wxTextCtrlcxx . . $ wxTextCtrl# *text_control; |
| 1078 | wxStringcxx . . $ wxString# outcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 1079 | if (m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_configcxx . . $ main_frame/MainFrame#m_config.->cxx . . $ boost/scoped_ptr#`operator->`(5a2a78a048fb49a8).getcxx . . $ configuration/Configuration#get(24764cae04130674).("score-hints"cxx . . $ std/__cxx11/basic_string#basic_string(3bc0f77cdfbaa67f).)==cxx . . $ std/`operator==`(4b17aa87c9f300c6)."False") { |
| 1080 | event.Skipcxx . . $ wxEvent#Skip(b45ddcbc8423892c).(); |
| 1081 | return; |
| 1082 | } |
| 1083 | if (! m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->IsValidDicecxx . . $ main_frame/MainFrame#IsValidDice(c9857a73d68e59ba).()){ |
| 1084 | event.Skipcxx . . $ wxEvent#Skip(b45ddcbc8423892c).(); |
| 1085 | return; |
| 1086 | } |
| 1087 | |
| 1088 | id = ((wxWindowcxx . . $ wxWindow# *)event.GetEventObjectcxx . . $ wxEvent#GetEventObject(d4436fb2a4efeefe).())->GetIdcxx . . $ wxWindowBase#GetId(455f465bc33b4cdf).(); |
| 1089 | text_control = ((wxTextCtrlcxx . . $ wxTextCtrl#*)m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(id-ID_ACEScxx . . $ main_frame/ID_ACES.+ID_ACESTEXTcxx . . $ main_frame/ID_ACESTEXT.)); |
| 1090 | switch (id) { |
| 1091 | case ID_ACEScxx . . $ main_frame/ID_ACES.: |
| 1092 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Acescxx . . $ ScoreDice#Aces(524863554b4a534e).()); |
| 1093 | break; |
| 1094 | case ID_TWOScxx . . $ main_frame/ID_TWOS.: |
| 1095 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Twoscxx . . $ ScoreDice#Twos(524863554b4a534e).()); |
| 1096 | break; |
| 1097 | case ID_THREEScxx . . $ main_frame/ID_THREES.: |
| 1098 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Threescxx . . $ ScoreDice#Threes(524863554b4a534e).()); |
| 1099 | break; |
| 1100 | case ID_FOURScxx . . $ main_frame/ID_FOURS.: |
| 1101 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Fourscxx . . $ ScoreDice#Fours(524863554b4a534e).()); |
| 1102 | break; |
| 1103 | case ID_FIVEScxx . . $ main_frame/ID_FIVES.: |
| 1104 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Fivescxx . . $ ScoreDice#Fives(524863554b4a534e).()); |
| 1105 | break; |
| 1106 | case ID_SIXEScxx . . $ main_frame/ID_SIXES.: |
| 1107 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Sixescxx . . $ ScoreDice#Sixes(524863554b4a534e).()); |
| 1108 | break; |
| 1109 | case ID_THREEOFAKINDcxx . . $ main_frame/ID_THREEOFAKIND.: |
| 1110 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..ThreeOfAKindcxx . . $ ScoreDice#ThreeOfAKind(524863554b4a534e).()); |
| 1111 | break; |
| 1112 | case ID_FOUROFAKINDcxx . . $ main_frame/ID_FOUROFAKIND.: |
| 1113 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..FourOfAKindcxx . . $ ScoreDice#FourOfAKind(524863554b4a534e).()); |
| 1114 | break; |
| 1115 | case ID_FULLHOUSEcxx . . $ main_frame/ID_FULLHOUSE.: |
| 1116 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..FullHousecxx . . $ ScoreDice#FullHouse(524863554b4a534e).()); |
| 1117 | break; |
| 1118 | case ID_SMALLSEQUENCEcxx . . $ main_frame/ID_SMALLSEQUENCE.: |
| 1119 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..SmallSequencecxx . . $ ScoreDice#SmallSequence(524863554b4a534e).()); |
| 1120 | break; |
| 1121 | case ID_LARGESEQUENCEcxx . . $ main_frame/ID_LARGESEQUENCE.: |
| 1122 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..LargeSequencecxx . . $ ScoreDice#LargeSequence(524863554b4a534e).()); |
| 1123 | break; |
| 1124 | case ID_YAHTZEEcxx . . $ main_frame/ID_YAHTZEE.: |
| 1125 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Yahtzeecxx . . $ ScoreDice#Yahtzee(524863554b4a534e).()); |
| 1126 | break; |
| 1127 | case ID_CHANCEcxx . . $ main_frame/ID_CHANCE.: |
| 1128 | out.Printfcxx . . $ wxString#Printf(d0e64e0fac4a554c).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("%hi"), m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->m_score_dicecxx . . $ main_frame/MainFrame#m_score_dice..Chancecxx . . $ ScoreDice#Chance(524863554b4a534e).()); |
| 1129 | break; |
| 1130 | } |
| 1131 | text_control->SetValuecxx . . $ wxTextCtrlBase#SetValue(eec3608749d303b4).(out); |
| 1132 | wxColourcxx . . $ wxColour# sys_gray = wxSystemSettingscxx . . $ wxColour#wxColour(c6fe1e6e9a9d4367).::GetColourcxx . . $ wxSystemSettingsNative#GetColour(569b49f68c1d7e90).(wxSYS_COLOUR_GRAYTEXTcxx . . $ wxSYS_COLOUR_GRAYTEXT.); |
| 1133 | text_control->SetForegroundColourcxx . . $ wxTextCtrl#SetForegroundColour(c4d9c5755b95f2b4).(sys_gray); |
| 1134 | |
| 1135 | event.Skipcxx . . $ wxEvent#Skip(b45ddcbc8423892c).(); //allow default proccesing |
| 1136 | } |
| 1137 | |
| 1138 | /** |
| 1139 | * |
| 1140 | */ |
| 1141 | void MainFrameEvtHandlercxx . . $ main_frame/MainFrameEvtHandler#::OnScoreMouseLeavecxx . . $ main_frame/MainFrameEvtHandler#OnScoreMouseLeave(7e6a1c70b0e99497). (wxMouseEventcxx . . $ wxMouseEvent#& event) |
| 1142 | { |
| 1143 | //we dont have the id of the control that generated the event |
| 1144 | wxTextCtrlcxx . . $ wxTextCtrl# *text_control; |
| 1145 | |
| 1146 | if (! m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->IsValidDicecxx . . $ main_frame/MainFrame#IsValidDice(c9857a73d68e59ba).()){ |
| 1147 | event.Skipcxx . . $ wxEvent#Skip(b45ddcbc8423892c).(); |
| 1148 | return; |
| 1149 | } |
| 1150 | |
| 1151 | auto id = ((wxWindowcxx . . $ wxWindow# *)event.GetEventObjectcxx . . $ wxEvent#GetEventObject(d4436fb2a4efeefe).())->GetIdcxx . . $ wxWindowBase#GetId(455f465bc33b4cdf).(); |
| 1152 | text_control = ((wxTextCtrlcxx . . $ wxTextCtrl#*)m_main_framecxx . . $ main_frame/MainFrameEvtHandler#m_main_frame.->FindWindowcxx . . $ wxWindowBase#FindWindow(3c3f93db58298cdf).(id - ID_ACEScxx . . $ main_frame/ID_ACES. + ID_ACESTEXTcxx . . $ main_frame/ID_ACESTEXT.)); |
| 1153 | wxColourcxx . . $ wxColour# sys_gray = wxSystemSettingscxx . . $ wxColour#wxColour(c6fe1e6e9a9d4367).::GetColourcxx . . $ wxSystemSettingsNative#GetColour(569b49f68c1d7e90).(wxSYS_COLOUR_GRAYTEXTcxx . . $ wxSYS_COLOUR_GRAYTEXT.); |
| 1154 | if (text_control->GetForegroundColourcxx . . $ wxWindowBase#GetForegroundColour(6bb92bbeabf2e6a2).() ==cxx . . $ wxColour#`operator==`(14c66e141df84724). sys_gray){ |
| 1155 | text_control->Clearcxx . . $ wxTextEntryBase#Clear(49f6e7a06ebc5aa8).(); |
| 1156 | text_control->SetForegroundColourcxx . . $ wxTextCtrl#SetForegroundColour(c4d9c5755b95f2b4).(wxNullColourcxx . . $ wxNullColour.); |
| 1157 | } |
| 1158 | |
| 1159 | event.Skipcxx . . $ wxEvent#Skip(b45ddcbc8423892c).(); //allow default proccesing |
| 1160 | } |
| 1161 | |
| 1162 | bool MainFramecxx . . $ main_frame/MainFrame#::IsValidClickcxx . . $ main_frame/MainFrame#IsValidClick(c9857a73d68e59ba).() |
| 1163 | { |
| 1164 | if (m_rollscxx . . $ main_frame/MainFrame#m_rolls. >= 3) { |
| 1165 | wxMessageBoxcxx . . $ wxMessageBox(ecb3b78af7b1e8ff).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("First you need to roll, and after you roll you may score."), |
| 1166 | wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Open Yahtzee"), wxOKcxx . . $ `<external>/14689491191722134862/defs.h:1890:9`! | wxICON_INFORMATIONcxx . . $ `<external>/14689491191722134862/defs.h:1905:9`!, this); |
| 1167 | return false; |
| 1168 | } |
| 1169 | return true; |
| 1170 | } |
| 1171 | |
| 1172 | MainFramecxx . . $ main_frame/MainFrame#::~cxx . . $ main_frame/MainFrame#`~MainFrame`(49f6e7a06ebc5aa8).MainFramecxx . . $ main_frame/MainFrame#() { |
| 1173 | // free pointers |
| 1174 | delete m_evt_handlercxx . . $ main_frame/MainFrame#m_evt_handler.; |
| 1175 | |
| 1176 | for (int i = 0; i<6; i++) { |
| 1177 | delete bitmap_dicecxx . . $ main_frame/MainFrame#bitmap_dice.[i]; |
| 1178 | } |
| 1179 | } |