Changeset 46 for trunk/OpenYahtzee/src/SettingsDialog.cpp
- Timestamp:
- 11/01/07 19:03:46 (6 years ago)
- File:
-
- 1 edited
-
trunk/OpenYahtzee/src/SettingsDialog.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/OpenYahtzee/src/SettingsDialog.cpp
r36 r46 34 34 SetIcon(wxIcon(ICON)); 35 35 36 // begin wxGlade: SettingsDialog::SettingsDialog37 36 label_1 = new wxStaticText(this, -1, wxT("High-score table size:")); 38 37 spin_ctrl = new wxSpinCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS,0,1024,20); … … 40 39 button_1 = new wxButton(this, wxID_OK); 41 40 button_2 = new wxButton(this, wxID_CANCEL); 41 animate_checkbox = new wxCheckBox(this, ID_ANIMATECHECKBOX, wxT("Animate dices")); 42 42 43 43 set_properties(); … … 61 61 void SettingsDialog::do_layout() 62 62 { 63 // begin wxGlade: SettingsDialog::do_layout 64 wxBoxSizer* top_sizer = new wxBoxSizer(wxVERTICAL); 65 wxBoxSizer* sizer_2 = new wxBoxSizer(wxHORIZONTAL); 66 wxBoxSizer* highscoresizer = new wxBoxSizer(wxHORIZONTAL); 67 highscoresizer->Add(label_1, 0, wxALL|wxADJUST_MINSIZE, 10); 68 highscoresizer->Add(spin_ctrl, 0, wxALL|wxADJUST_MINSIZE, 10); 69 top_sizer->Add(highscoresizer, 0, 0, 0); 70 top_sizer->Add(button_3, 0,wxALL|wxALIGN_RIGHT|wxADJUST_MINSIZE, 10); 71 sizer_2->Add(button_1, 0, wxALL|wxADJUST_MINSIZE, 10); 72 sizer_2->Add(button_2, 0, wxALL|wxADJUST_MINSIZE, 10); 73 top_sizer->Add(sizer_2, 1, 0, 0); 74 SetAutoLayout(true); 75 SetSizer(top_sizer); 76 top_sizer->Fit(this); 77 top_sizer->SetSizeHints(this); 78 Layout(); 79 // end wxGlade 63 wxBoxSizer* top_sizer = new wxBoxSizer(wxVERTICAL); 64 wxBoxSizer* sizer_2 = new wxBoxSizer(wxHORIZONTAL); 65 wxBoxSizer* highscoresizer = new wxBoxSizer(wxHORIZONTAL); 66 highscoresizer->Add(label_1, 0, wxALL|wxADJUST_MINSIZE, 10); 67 highscoresizer->Add(spin_ctrl, 0, wxALL|wxADJUST_MINSIZE, 10); 68 top_sizer->Add(highscoresizer, 0, 0, 0); 69 top_sizer->Add(button_3, 0,wxALL|wxALIGN_RIGHT|wxADJUST_MINSIZE, 10); 70 71 top_sizer->Add(animate_checkbox,0,wxALL,10); 72 73 sizer_2->Add(button_1, 0, wxALL|wxADJUST_MINSIZE, 10); 74 sizer_2->Add(button_2, 0, wxALL|wxADJUST_MINSIZE, 10); 75 top_sizer->Add(sizer_2, 1, 0, 0); 76 SetAutoLayout(true); 77 SetSizer(top_sizer); 78 top_sizer->Fit(this); 79 top_sizer->SetSizeHints(this); 80 Layout(); 80 81 } 81 82 … … 97 98 { 98 99 spin_ctrl->SetValue(data.highscoresize); 100 animate_checkbox->SetValue(data.animate); 99 101 } 100 102 … … 104 106 data.highscoresize = spin_ctrl->GetValue(); 105 107 data.reset = button_3->GetValue(); 108 data.animate = animate_checkbox->GetValue(); 106 109 return data; 107 110 }
Note: See TracChangeset
for help on using the changeset viewer.
