Changeset 88 for trunk


Ignore:
Timestamp:
27/05/07 13:16:16 (6 years ago)
Author:
guyru
Message:

added settings for horizontal dialog in settings-dialog

Location:
trunk/OpenYahtzee
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/OpenYahtzee/openyahtzee.kdevses

    r87 r88  
    22<!DOCTYPE KDevPrjSession> 
    33<KDevPrjSession> 
    4  <DocsAndViews NumberOfDocuments="8" > 
     4 <DocsAndViews NumberOfDocuments="9" > 
    55  <Doc0 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/About.cpp" > 
    66   <View0 Type="Source" /> 
     
    1010  </Doc1> 
    1111  <Doc2 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/MainFrame.cpp" > 
    12    <View0 line="199" Type="Source" /> 
     12   <View0 line="124" Type="Source" /> 
    1313  </Doc2> 
    1414  <Doc3 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/MainFrame.h" > 
     
    2121   <View0 Type="Source" /> 
    2222  </Doc5> 
    23   <Doc6 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/UtilityFunctions.cpp" > 
    24    <View0 Type="Source" /> 
     23  <Doc6 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/wxDynamicBitmap.cpp" > 
     24   <View0 line="106" Type="Source" /> 
    2525  </Doc6> 
    26   <Doc7 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/wxDynamicBitmap.cpp" > 
    27    <View0 line="84" Type="Source" /> 
     26  <Doc7 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/SettingsDialog.cpp" > 
     27   <View0 line="40" Type="Source" /> 
    2828  </Doc7> 
     29  <Doc8 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/SettingsDialog.h" > 
     30   <View0 line="70" Type="Source" /> 
     31  </Doc8> 
    2932 </DocsAndViews> 
    3033 <pluginList> 
  • trunk/OpenYahtzee/src/MainFrame.cpp

    r87 r88  
    122122        wxPanel* panel = new wxPanel(this, ID_PANEL, 
    123123                wxDefaultPosition, wxDefaultSize); 
    124         m_horizontallayout = 0; //TODO remove this line 
     124 
    125125        wxBoxSizer *topSizer; 
    126126        wxBoxSizer *sectionsSizer; 
     
    430430        data.animate = (m_settingsdb->GetKey("animate")=="Yes")?true:false; 
    431431        data.subtotal = (m_settingsdb->GetKey("calculatesubtotal")=="Yes")?true:false; 
     432        data.horizontal = (m_settingsdb->GetKey("horizontallayout")=="Yes")?true:false; 
    432433         
    433434        dialog->SetData(data); 
     
    458459                        m_settingsdb->SetKey("calculatesubtotal","No"); 
    459460                        m_calculatesubtotal = false; 
     461                } 
     462                if (data.horizontal){ 
     463                        m_settingsdb->SetKey("horizontallayout","Yes"); 
     464                        m_horizontallayout = true; 
     465                         
     466                } else { 
     467                        m_settingsdb->SetKey("horizontallayout","No"); 
     468                        m_horizontallayout = false; 
    460469                } 
    461470 
     
    10141023                m_animate = true; 
    10151024        } 
     1025 
    10161026        if (m_settingsdb->GetKey("calculatesubtotal") == "Yes") { 
    10171027                m_calculatesubtotal = true; 
     
    10221032                m_calculatesubtotal = true; 
    10231033        } 
    1024          
     1034 
     1035        if (m_settingsdb->GetKey("horizontallayout") == "Yes") { 
     1036                m_horizontallayout = true; 
     1037        } else if (m_settingsdb->GetKey("horizontallayout") == "No") { 
     1038                m_horizontallayout = false; 
     1039        } else { 
     1040                m_settingsdb->SetKey("horizontallayout", "No"); 
     1041                m_horizontallayout = false; 
     1042        } 
    10251043        if (m_settingsdb->GetKey("openyahtzeehomepage") == "") { 
    10261044                m_settingsdb->SetKey("openyahtzeehomepage", "http://openyahtzee.sourceforge.net/"); 
  • trunk/OpenYahtzee/src/SettingsDialog.cpp

    r58 r88  
    3939        animate_checkbox = new wxCheckBox(this, ID_ANIMATECHECKBOX, wxT("Animate dice")); 
    4040        subtotal_checkbox = new wxCheckBox(this, wxID_ANY, wxT("Calculate sub-total score for the upper and lower sections")); 
     41        horizontal_checkbox = new wxCheckBox(this, wxID_ANY, wxT("Enable horizontal layout for user interface \n(requires restart of the game).")); 
    4142 
    4243 
     
    6566        top_sizer->Add(animate_checkbox,0,wxALL,5); 
    6667        top_sizer->Add(subtotal_checkbox,0,wxALL,5); 
     68        top_sizer->Add(horizontal_checkbox,0,wxALL,5); 
    6769 
    6870        top_sizer->Add(CreateButtonSizer(wxOK|wxCANCEL), 1, wxBOTTOM, 10); 
     
    9395        animate_checkbox->SetValue(data.animate); 
    9496        subtotal_checkbox->SetValue(data.subtotal); 
     97        horizontal_checkbox->SetValue(data.horizontal); 
    9598} 
    9699 
     
    102105        data.animate = animate_checkbox->GetValue(); 
    103106        data.subtotal = subtotal_checkbox->GetValue(); 
     107        data.horizontal = horizontal_checkbox->GetValue(); 
    104108        return data; 
    105109} 
  • trunk/OpenYahtzee/src/SettingsDialog.h

    r58 r88  
    3939        bool animate; 
    4040        bool subtotal; 
     41        bool horizontal; 
    4142}; 
    4243 
     
    6869        wxCheckBox* animate_checkbox; 
    6970        wxCheckBox* subtotal_checkbox; 
     71        wxCheckBox* horizontal_checkbox; 
    7072         
    7173}; 
Note: See TracChangeset for help on using the changeset viewer.