Ignore:
Timestamp:
11/01/07 19:03:46 (6 years ago)
Author:
guyru
Message:

started dice animation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/OpenYahtzee/src/SettingsDialog.cpp

    r36 r46  
    3434        SetIcon(wxIcon(ICON)); 
    3535 
    36         // begin wxGlade: SettingsDialog::SettingsDialog 
    3736        label_1 = new wxStaticText(this, -1, wxT("High-score table size:")); 
    3837        spin_ctrl = new wxSpinCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS,0,1024,20); 
     
    4039        button_1 = new wxButton(this, wxID_OK); 
    4140        button_2 = new wxButton(this, wxID_CANCEL); 
     41        animate_checkbox = new wxCheckBox(this, ID_ANIMATECHECKBOX, wxT("Animate dices")); 
    4242 
    4343        set_properties(); 
     
    6161void SettingsDialog::do_layout() 
    6262{ 
    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(); 
    8081} 
    8182 
     
    9798{ 
    9899        spin_ctrl->SetValue(data.highscoresize); 
     100        animate_checkbox->SetValue(data.animate); 
    99101} 
    100102 
     
    104106        data.highscoresize = spin_ctrl->GetValue(); 
    105107        data.reset = button_3->GetValue(); 
     108        data.animate = animate_checkbox->GetValue(); 
    106109        return data; 
    107110} 
Note: See TracChangeset for help on using the changeset viewer.