| 1 | /*************************************************************************** |
| 2 | * Copyright (C) 2006-2008 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 | #include <wx/button.h> |
| 22 | #include <wx/sizer.h> |
| 23 | |
| 24 | #include "highscores_dialog.h"cxx . . $ `<file>/src/highscores_dialog.h`/ |
| 25 | |
| 26 | #include "icon32.xpm"cxx . . $ `<file>/src/icon32.xpm`/ |
| 27 | |
| 28 | using namespace std; |
| 29 | using namespace highscores_dialog; |
| 30 | |
| 31 | const int HIGHSCORELIST_BORDERcxx . . $ HIGHSCORELIST_BORDER. = 10; |
| 32 | |
| 33 | HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog#::HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog#HighscoresDialog(7af1d2303ce98172).(wxWindowcxx . . $ wxWindow#* parent,configurationcxx . . $ configuration/::Configurationcxx . . $ configuration/Configuration#* config, int highlight_rank) : |
| 34 | wxDialogcxx . . $ wxDialog#wxDialog(d091a3913c1b2ac).(parent, wxID_ANYcxx . . $ wxID_ANY., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Highscores Table"), wxDefaultPositioncxx . . $ wxDefaultPosition., wxDefaultSizecxx . . $ wxDefaultSize., wxDEFAULT_DIALOG_STYLEcxx . . $ `<external>/1556222971298634691/dialog.h:31:9`! | wxRESIZE_BORDERcxx . . $ `<external>/10524890736914687764/toplevel.h:76:9`!) |
| 35 | { |
| 36 | this->highlight_rankcxx . . $ highscores_dialog/HighscoresDialog#highlight_rank. = highlight_rank; |
| 37 | m_configcxx . . $ highscores_dialog/HighscoresDialog#m_config. = config; |
| 38 | |
| 39 | SetIconcxx . . $ wxTopLevelWindowBase#SetIcon(d249de01a60891a7).(wxIconcxx . . $ wxIcon#wxIcon(ac4b840ac9fbb56d).(icon32_xpmcxx . . $ icon32_xpm.)); |
| 40 | |
| 41 | createControlscxx . . $ highscores_dialog/HighscoresDialog#createControls(49f6e7a06ebc5aa8).(); |
| 42 | loadDatacxx . . $ highscores_dialog/HighscoresDialog#loadData(49f6e7a06ebc5aa8).(); |
| 43 | doLayoutcxx . . $ highscores_dialog/HighscoresDialog#doLayout(49f6e7a06ebc5aa8).(); |
| 44 | connectEventTablecxx . . $ highscores_dialog/HighscoresDialog#connectEventTable(49f6e7a06ebc5aa8).(); |
| 45 | } |
| 46 | |
| 47 | void HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog#::createControlscxx . . $ highscores_dialog/HighscoresDialog#createControls(49f6e7a06ebc5aa8).() |
| 48 | { |
| 49 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist. = new wxListCtrlcxx . . $ wxListCtrl#(this,wxID_ANYcxx . . $ wxID_ANY.,wxDefaultPositioncxx . . $ wxDefaultPosition.,wxSizecxx . . $ wxSize#wxSize(3e454b8ccf442868).(450,400),wxLC_REPORTcxx . . $ `<external>/11219747597300648457/listbase.h:42:9`! | wxBORDER_SUNKENcxx . . $ wxBORDER_SUNKEN. ); |
| 50 | |
| 51 | wxListItemcxx . . $ wxListItem# itemColcxx . . $ wxListItem#wxListItem(49f6e7a06ebc5aa8).; |
| 52 | |
| 53 | itemCol.SetTextcxx . . $ wxListItem#SetText(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Rank")); |
| 54 | itemCol.SetImagecxx . . $ wxListItem#SetImage(d4f767463ce0a6b3).(-1); |
| 55 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->InsertColumncxx . . $ wxListCtrlBase#InsertColumn(fd63eac27ebeab3c).(0, itemCol); |
| 56 | |
| 57 | itemCol.SetTextcxx . . $ wxListItem#SetText(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Name")); |
| 58 | itemCol.SetImagecxx . . $ wxListItem#SetImage(d4f767463ce0a6b3).(-1); |
| 59 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->InsertColumncxx . . $ wxListCtrlBase#InsertColumn(fd63eac27ebeab3c).(1, itemCol); |
| 60 | |
| 61 | itemCol.SetTextcxx . . $ wxListItem#SetText(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Score")); |
| 62 | itemCol.SetImagecxx . . $ wxListItem#SetImage(d4f767463ce0a6b3).(-1); |
| 63 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->InsertColumncxx . . $ wxListCtrlBase#InsertColumn(fd63eac27ebeab3c).(2, itemCol); |
| 64 | |
| 65 | itemCol.SetTextcxx . . $ wxListItem#SetText(eec3608749d303b4).(wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Date")); |
| 66 | itemCol.SetImagecxx . . $ wxListItem#SetImage(d4f767463ce0a6b3).(-1); |
| 67 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->InsertColumncxx . . $ wxListCtrlBase#InsertColumn(fd63eac27ebeab3c).(3, itemCol); |
| 68 | |
| 69 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->SetColumnWidthcxx . . $ wxGenericListCtrl#SetColumnWidth(cf9ef193275fa6d8).(0, 50 ); |
| 70 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->SetColumnWidthcxx . . $ wxGenericListCtrl#SetColumnWidth(cf9ef193275fa6d8).(1, 195 ); |
| 71 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->SetColumnWidthcxx . . $ wxGenericListCtrl#SetColumnWidth(cf9ef193275fa6d8).(2, 60 ); |
| 72 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->SetColumnWidthcxx . . $ wxGenericListCtrl#SetColumnWidth(cf9ef193275fa6d8).(3, 140 ); |
| 73 | } |
| 74 | |
| 75 | void HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog#::loadDatacxx . . $ highscores_dialog/HighscoresDialog#loadData(49f6e7a06ebc5aa8).() |
| 76 | { |
| 77 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->DeleteAllItemscxx . . $ wxGenericListCtrl#DeleteAllItems(c9857a73d68e59ba).(); |
| 78 | const configurationcxx . . $ configuration/::HighscoresListcxx . . $ configuration/HighscoresList# *list = m_configcxx . . $ highscores_dialog/HighscoresDialog#m_config.->getHighscorescxx . . $ configuration/Configuration#getHighscores(ffe7302f15546b8a).(); |
| 79 | |
| 80 | configurationcxx . . $ configuration/::HighscoresListcxx . . $ configuration/HighscoresList#::const_iteratorcxx . . $ std/__cxx11/list#const_iterator# itcxx . . $ std/_List_const_iterator#_List_const_iterator(49f6e7a06ebc5aa8).; |
| 81 | wxStringcxx . . $ wxString# bufcxx . . $ wxString#wxString(49f6e7a06ebc5aa8).; |
| 82 | |
| 83 | int i = 0; |
| 84 | for (it =cxx . . $ std/_List_const_iterator#`operator=`(936b666201d66ee7). list->begincxx . . $ std/__cxx11/list#begin(236863039d991ee3).(); it!=cxx . . $ std/`operator!=`(cf6b1fbdf415a68f).list->endcxx . . $ std/__cxx11/list#end(236863039d991ee3).(); it++cxx . . $ std/_List_const_iterator#operator++(96c7bc7ce7288356)., i++) { |
| 85 | // rank |
| 86 | buf.Clearcxx . . $ wxString#Clear(49f6e7a06ebc5aa8).(); |
| 87 | buf<<cxx . . $ wxString#`operator<<`(f0041bc5c01ce99e).(i+1); |
| 88 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->InsertItemcxx . . $ wxGenericListCtrl#InsertItem(8867b6274d4a7bec).(i,buf,-1); |
| 89 | |
| 90 | // name |
| 91 | buf =cxx . . $ wxString#`operator=`(112791f5da12414c). wxStringcxx . . $ wxString#::FromUTF8cxx . . $ wxString#FromUTF8(9bde915dfd6800d5).(it->cxx . . $ std/_List_const_iterator#`operator->`(1016ee5406d91ab9).namecxx . . $ configuration/HighscoreItem#name..c_strcxx . . $ std/__cxx11/basic_string#c_str(1016ee5406d91ab9).()); |
| 92 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->SetItemcxx . . $ wxGenericListCtrl#SetItem(a04a6899c69fdbee).(i,1,buf); |
| 93 | |
| 94 | // score |
| 95 | buf.Clearcxx . . $ wxString#Clear(49f6e7a06ebc5aa8).(); |
| 96 | buf<<cxx . . $ wxString#`operator<<`(f0041bc5c01ce99e). it->cxx . . $ std/_List_const_iterator#`operator->`(1016ee5406d91ab9).scorecxx . . $ configuration/HighscoreItem#score.; |
| 97 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->SetItemcxx . . $ wxGenericListCtrl#SetItem(a04a6899c69fdbee).(i,2,buf); |
| 98 | |
| 99 | // date |
| 100 | buf =cxx . . $ wxString#`operator=`(112791f5da12414c). wxStringcxx . . $ wxString#::FromUTF8cxx . . $ wxString#FromUTF8(9bde915dfd6800d5).(it->cxx . . $ std/_List_const_iterator#`operator->`(1016ee5406d91ab9).datecxx . . $ configuration/HighscoreItem#date..c_strcxx . . $ std/__cxx11/basic_string#c_str(1016ee5406d91ab9).()); |
| 101 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->SetItemcxx . . $ wxGenericListCtrl#SetItem(a04a6899c69fdbee).(i,3,buf); |
| 102 | } |
| 103 | |
| 104 | if (highlight_rankcxx . . $ highscores_dialog/HighscoresDialog#highlight_rank.) { |
| 105 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->SetItemTextColourcxx . . $ wxGenericListCtrl#SetItemTextColour(97a925ce5a23c1b0).(highlight_rankcxx . . $ highscores_dialog/HighscoresDialog#highlight_rank.-1,*wxREDcxx . . $ `<external>/15936994373797470861/gdicmn.h:1064:9`!); |
| 106 | } |
| 107 | } |
| 108 | |
| 109 | void HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog#::doLayoutcxx . . $ highscores_dialog/HighscoresDialog#doLayout(49f6e7a06ebc5aa8).() |
| 110 | { |
| 111 | wxBoxSizercxx . . $ wxBoxSizer# *top_sizer = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).( wxVERTICALcxx . . $ wxVERTICAL. ); |
| 112 | |
| 113 | top_sizer->Addcxx . . $ wxSizer#Add(71dcc790f806ec5).(highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist., 1, wxEXPANDcxx . . $ wxEXPAND. | wxALLcxx . . $ wxALL., HIGHSCORELIST_BORDERcxx . . $ HIGHSCORELIST_BORDER.); |
| 114 | |
| 115 | wxBoxSizercxx . . $ wxBoxSizer# *button_sizer = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).( wxHORIZONTALcxx . . $ wxHORIZONTAL. ); |
| 116 | |
| 117 | wxSizerFlagscxx . . $ wxSizerFlags# flags = wxSizerFlagscxx . . $ wxSizerFlags#wxSizerFlags(d4f767463ce0a6b3).().Bordercxx . . $ wxSizerFlags#Border(dfdbc60f023876a4).(wxALLcxx . . $ wxALL. & ~wxLEFTcxx . . $ wxLEFT., 10); |
| 118 | |
| 119 | button_sizer->AddStretchSpacercxx . . $ wxSizer#AddStretchSpacer(fab1f36e22a68e4b).(); |
| 120 | button_sizer->Addcxx . . $ wxSizer#Add(2646dc3ffda68198).(new wxButtoncxx . . $ wxButton#(this,wxID_CLEARcxx . . $ wxID_CLEAR.),flags); |
| 121 | button_sizer->Addcxx . . $ wxSizer#Add(2646dc3ffda68198).(new wxButtoncxx . . $ wxButton#(this,ID_CONFIGUREcxx . . $ highscores_dialog/ID_CONFIGURE.,wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Configure")),flags); |
| 122 | button_sizer->Addcxx . . $ wxSizer#Add(2646dc3ffda68198).( new wxButtoncxx . . $ wxButton#(this,wxID_CLOSEcxx . . $ wxID_CLOSE.), flags); |
| 123 | |
| 124 | top_sizer->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(button_sizer,0,wxEXPANDcxx . . $ wxEXPAND.); |
| 125 | |
| 126 | SetSizercxx . . $ wxWindowBase#SetSizer(6b8f606b81107616).(top_sizer); |
| 127 | top_sizer->SetSizeHintscxx . . $ wxSizer#SetSizeHints(4289b2e0b1e17a99).(this); |
| 128 | } |
| 129 | |
| 130 | |
| 131 | void HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog#::connectEventTablecxx . . $ highscores_dialog/HighscoresDialog#connectEventTable(49f6e7a06ebc5aa8).() |
| 132 | { |
| 133 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(wxID_CLOSEcxx . . $ wxID_CLOSE., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(HighscoresDialog::onClose)); |
| 134 | |
| 135 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(wxID_CLEARcxx . . $ wxID_CLEAR., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(HighscoresDialog::onClear)); |
| 136 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(ID_CONFIGUREcxx . . $ highscores_dialog/ID_CONFIGURE., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(HighscoresDialog::onConfigure)); |
| 137 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(this->GetIdcxx . . $ wxWindowBase#GetId(455f465bc33b4cdf).(), wxEVT_SIZEcxx . . $ wxEVT_SIZE., wxSizeEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4276:9`!(HighscoresDialog::onResize)); |
| 138 | } |
| 139 | void HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog#::onClosecxx . . $ highscores_dialog/HighscoresDialog#onClose(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 140 | { |
| 141 | Closecxx . . $ wxWindowBase#Close(efaadfb7dc14930a).(); |
| 142 | } |
| 143 | |
| 144 | void HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog#::onConfigurecxx . . $ highscores_dialog/HighscoresDialog#onConfigure(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 145 | { |
| 146 | HighscoresSettingsDialogcxx . . $ highscores_dialog/HighscoresSettingsDialog# *dialog = new HighscoresSettingsDialogcxx . . $ highscores_dialog/HighscoresSettingsDialog#(this, m_configcxx . . $ highscores_dialog/HighscoresDialog#m_config.); |
| 147 | |
| 148 | if (dialog->ShowModalcxx . . $ wxDialog#ShowModal(b126dc7c1de90089).() == wxID_OKcxx . . $ wxID_OK.) { |
| 149 | loadDatacxx . . $ highscores_dialog/HighscoresDialog#loadData(49f6e7a06ebc5aa8).(); |
| 150 | } |
| 151 | |
| 152 | delete dialog; |
| 153 | } |
| 154 | |
| 155 | void HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog#::onClearcxx . . $ highscores_dialog/HighscoresDialog#onClear(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) |
| 156 | { |
| 157 | int answer = wxMessageBoxcxx . . $ wxMessageBox(ecb3b78af7b1e8ff).( |
| 158 | wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Are you sure you want to clear the Highscores table?\nThis action cannot be reversed."), |
| 159 | wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Are You Sure?"), |
| 160 | wxYEScxx . . $ `<external>/14689491191722134862/defs.h:1889:9`! | wxNOcxx . . $ `<external>/14689491191722134862/defs.h:1891:9`!, |
| 161 | this); |
| 162 | |
| 163 | if (answer == wxYEScxx . . $ `<external>/14689491191722134862/defs.h:1889:9`!) { |
| 164 | m_configcxx . . $ highscores_dialog/HighscoresDialog#m_config.->clearHighscorescxx . . $ configuration/Configuration#clearHighscores(49f6e7a06ebc5aa8).(); |
| 165 | loadDatacxx . . $ highscores_dialog/HighscoresDialog#loadData(49f6e7a06ebc5aa8).(); |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | |
| 170 | HighscoresSettingsDialogcxx . . $ highscores_dialog/HighscoresSettingsDialog#::HighscoresSettingsDialogcxx . . $ highscores_dialog/HighscoresSettingsDialog#HighscoresSettingsDialog(ac953e2d406b5f17).(wxWindowcxx . . $ wxWindow#* parent, configurationcxx . . $ configuration/::Configurationcxx . . $ configuration/Configuration#* config) : |
| 171 | wxDialogcxx . . $ wxDialog#wxDialog(d091a3913c1b2ac).(parent, wxID_ANYcxx . . $ wxID_ANY., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("Highscores Table Settings"), wxDefaultPositioncxx . . $ wxDefaultPosition., wxDefaultSizecxx . . $ wxDefaultSize., wxDEFAULT_DIALOG_STYLEcxx . . $ `<external>/1556222971298634691/dialog.h:31:9`!) |
| 172 | { |
| 173 | this->m_configcxx . . $ highscores_dialog/HighscoresSettingsDialog#m_config. = config; |
| 174 | doLayoutcxx . . $ highscores_dialog/HighscoresSettingsDialog#doLayout(49f6e7a06ebc5aa8).(); |
| 175 | |
| 176 | Connectcxx . . $ wxEvtHandler#Connect(bb4f3294b37e5589).(wxID_OKcxx . . $ wxID_OK., wxEVT_COMMAND_BUTTON_CLICKEDcxx . . $ `<external>/9123237030240659982/event.h:4822:9`!, wxCommandEventHandlercxx . . $ `<external>/9123237030240659982/event.h:4270:9`!(HighscoresSettingsDialog::onOk)); |
| 177 | } |
| 178 | |
| 179 | void HighscoresSettingsDialogcxx . . $ highscores_dialog/HighscoresSettingsDialog#::doLayoutcxx . . $ highscores_dialog/HighscoresSettingsDialog#doLayout(49f6e7a06ebc5aa8).() |
| 180 | { |
| 181 | wxBoxSizercxx . . $ wxBoxSizer#* top_sizer = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).(wxVERTICALcxx . . $ wxVERTICAL.); |
| 182 | |
| 183 | wxBoxSizercxx . . $ wxBoxSizer#* size_sizer = new wxBoxSizercxx . . $ wxBoxSizer#wxBoxSizer(d4f767463ce0a6b3).(wxHORIZONTALcxx . . $ wxHORIZONTAL.); |
| 184 | |
| 185 | size_sizer->Addcxx . . $ wxSizer#Add(2646dc3ffda68198).(new wxStaticTextcxx . . $ wxStaticText#(this, wxID_ANYcxx . . $ wxID_ANY., wxTcxx . . $ `<external>/13533349018018911527/chartype.h:199:17`!("High score table size:")), wxSizerFlagscxx . . $ wxSizerFlags#wxSizerFlags(d4f767463ce0a6b3).().Bordercxx . . $ wxSizerFlags#Border(dfdbc60f023876a4).(wxALLcxx . . $ wxALL.,10)); |
| 186 | |
| 187 | int size = atoicxx . . $ atoi(5c4306d8553b3696).(m_configcxx . . $ highscores_dialog/HighscoresSettingsDialog#m_config.->getcxx . . $ configuration/Configuration#get(24764cae04130674).("highscore-list-size"cxx . . $ std/__cxx11/basic_string#basic_string(3bc0f77cdfbaa67f).).c_strcxx . . $ std/__cxx11/basic_string#c_str(1016ee5406d91ab9).()); |
| 188 | spin_ctrlcxx . . $ highscores_dialog/HighscoresSettingsDialog#spin_ctrl. = new wxSpinCtrlcxx . . $ wxSpinCtrl#(this, wxID_ANYcxx . . $ wxID_ANY.); |
| 189 | spin_ctrlcxx . . $ highscores_dialog/HighscoresSettingsDialog#spin_ctrl.->SetRangecxx . . $ wxSpinCtrl#SetRange(3e454b8ccf442868).(10,200); |
| 190 | spin_ctrlcxx . . $ highscores_dialog/HighscoresSettingsDialog#spin_ctrl.->SetValuecxx . . $ wxSpinCtrl#SetValue(d4f767463ce0a6b3).(size); |
| 191 | |
| 192 | size_sizer->Addcxx . . $ wxSizer#Add(2646dc3ffda68198).(spin_ctrlcxx . . $ highscores_dialog/HighscoresSettingsDialog#spin_ctrl.,wxSizerFlagscxx . . $ wxSizerFlags#wxSizerFlags(d4f767463ce0a6b3).().Bordercxx . . $ wxSizerFlags#Border(dfdbc60f023876a4).(wxALLcxx . . $ wxALL. & ~wxLEFTcxx . . $ wxLEFT.,10)); |
| 193 | |
| 194 | top_sizer->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(size_sizer); |
| 195 | top_sizer->Addcxx . . $ wxSizer#Add(c5b4b396efb9dbb2).(CreateButtonSizercxx . . $ wxDialogBase#CreateButtonSizer(7e6f577596ab4fac).(wxOKcxx . . $ `<external>/14689491191722134862/defs.h:1890:9`!|wxCANCELcxx . . $ `<external>/14689491191722134862/defs.h:1893:9`!), 1, wxBOTTOMcxx . . $ wxBOTTOM., 10); |
| 196 | |
| 197 | SetSizercxx . . $ wxWindowBase#SetSizer(6b8f606b81107616).(top_sizer); |
| 198 | top_sizer->SetSizeHintscxx . . $ wxSizer#SetSizeHints(4289b2e0b1e17a99).(this); |
| 199 | } |
| 200 | |
| 201 | void HighscoresSettingsDialogcxx . . $ highscores_dialog/HighscoresSettingsDialog#::onOkcxx . . $ highscores_dialog/HighscoresSettingsDialog#onOk(f55e5a77ec619b42).(wxCommandEventcxx . . $ wxCommandEvent#& event) { |
| 202 | int size = spin_ctrlcxx . . $ highscores_dialog/HighscoresSettingsDialog#spin_ctrl.->GetValuecxx . . $ wxSpinCtrl#GetValue(455f465bc33b4cdf).(); |
| 203 | m_configcxx . . $ highscores_dialog/HighscoresSettingsDialog#m_config.->setHighscoresSizecxx . . $ configuration/Configuration#setHighscoresSize(2c44cd906ae4e829).(size); |
| 204 | event.Skipcxx . . $ wxEvent#Skip(b45ddcbc8423892c).(); |
| 205 | } |
| 206 | |
| 207 | void HighscoresDialogcxx . . $ highscores_dialog/HighscoresDialog#::onResizecxx . . $ highscores_dialog/HighscoresDialog#onResize(2b95f7f26403c12f).(wxSizeEventcxx . . $ wxSizeEvent# &event) { |
| 208 | |
| 209 | const int width = event.GetSizecxx . . $ wxSizeEvent#GetSize(1760195b8cec6c4e).().GetWidthcxx . . $ wxSize#GetWidth(455f465bc33b4cdf).(); |
| 210 | const int rank_width = highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->GetColumnWidthcxx . . $ wxGenericListCtrl#GetColumnWidth(7ccb52b1bfe01045).(0); |
| 211 | const int score_width = highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->GetColumnWidthcxx . . $ wxGenericListCtrl#GetColumnWidth(7ccb52b1bfe01045).(2); |
| 212 | const int date_width = highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->GetColumnWidthcxx . . $ wxGenericListCtrl#GetColumnWidth(7ccb52b1bfe01045).(3); |
| 213 | const int new_width = width - 2*HIGHSCORELIST_BORDERcxx . . $ HIGHSCORELIST_BORDER. - rank_width - score_width - date_width; |
| 214 | |
| 215 | highscoreslistcxx . . $ highscores_dialog/HighscoresDialog#highscoreslist.->SetColumnWidthcxx . . $ wxGenericListCtrl#SetColumnWidth(cf9ef193275fa6d8).(1,new_width); |
| 216 | event.Skipcxx . . $ wxEvent#Skip(b45ddcbc8423892c).(); |
| 217 | } |