Changeset 87 for trunk


Ignore:
Timestamp:
27/05/07 09:05:36 (7 years ago)
Author:
guyru
Message:

added new horizontal layout.

Location:
trunk/OpenYahtzee
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/OpenYahtzee/openyahtzee.kdevses

    r85 r87  
    44 <DocsAndViews NumberOfDocuments="8" > 
    55  <Doc0 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/About.cpp" > 
    6    <View0 line="106" Type="Source" /> 
     6   <View0 Type="Source" /> 
    77  </Doc0> 
    88  <Doc1 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/openyahtzee.cpp" > 
    9    <View0 line="0" Type="Source" /> 
     9   <View0 Type="Source" /> 
    1010  </Doc1> 
    1111  <Doc2 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/MainFrame.cpp" > 
    12    <View0 line="505" Type="Source" /> 
     12   <View0 line="199" Type="Source" /> 
    1313  </Doc2> 
    1414  <Doc3 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/MainFrame.h" > 
    15    <View0 line="31" Type="Source" /> 
     15   <View0 line="99" Type="Source" /> 
    1616  </Doc3> 
    1717  <Doc4 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/About.h" > 
    18    <View0 line="24" Type="Source" /> 
     18   <View0 Type="Source" /> 
    1919  </Doc4> 
    2020  <Doc5 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/UtilityFunctions.h" > 
    21    <View0 line="30" Type="Source" /> 
     21   <View0 Type="Source" /> 
    2222  </Doc5> 
    2323  <Doc6 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/UtilityFunctions.cpp" > 
    24    <View0 line="23" Type="Source" /> 
     24   <View0 Type="Source" /> 
    2525  </Doc6> 
    2626  <Doc7 NumberOfViews="1" URL="file:///home/guy/workspace/openyahtzee/trunk/OpenYahtzee/src/wxDynamicBitmap.cpp" > 
  • trunk/OpenYahtzee/src/MainFrame.cpp

    r85 r87  
    122122        wxPanel* panel = new wxPanel(this, ID_PANEL, 
    123123                wxDefaultPosition, wxDefaultSize); 
    124  
    125         wxBoxSizer *topSizer = new wxBoxSizer( wxHORIZONTAL ); 
    126         wxBoxSizer *sectionsSizer = new wxBoxSizer( wxVERTICAL ); 
    127         wxBoxSizer *diceSizer = new wxBoxSizer( wxVERTICAL ); 
     124        m_horizontallayout = 0; //TODO remove this line 
     125        wxBoxSizer *topSizer; 
     126        wxBoxSizer *sectionsSizer; 
     127        wxFlexGridSizer *diceSizer; 
     128        if (m_horizontallayout) { 
     129                topSizer = new wxBoxSizer( wxVERTICAL ); 
     130                sectionsSizer = new wxBoxSizer( wxHORIZONTAL ); 
     131                diceSizer = new wxFlexGridSizer(2, 0, 0, 0); 
     132        } else { 
     133                topSizer = new wxBoxSizer( wxHORIZONTAL ); 
     134                sectionsSizer = new wxBoxSizer( wxVERTICAL ); 
     135                diceSizer = new wxFlexGridSizer(1, 0, 0);; 
     136        } 
    128137 
    129138        wxSizer *uppersection = new wxStaticBoxSizer( new wxStaticBox( panel, wxID_ANY, wxT("Upper Section") ), wxVERTICAL); 
     
    183192 
    184193        //BEGIN layout for the dice section of the score board 
    185         diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE1,*bitmap_dices[0]),0,wxALL,3); 
    186         diceSizer->Add(new wxCheckBox(panel, ID_DICE1KEEP, wxT("Keep")),0,wxBOTTOM,10); 
    187         diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE2,*bitmap_dices[1]),0,wxALL,3); 
    188         diceSizer->Add(new wxCheckBox(panel, ID_DICE2KEEP, wxT("Keep")),0,wxBOTTOM,10); 
    189         diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE3,*bitmap_dices[2]),0,wxALL,3); 
    190         diceSizer->Add(new wxCheckBox(panel, ID_DICE3KEEP, wxT("Keep")),0,wxBOTTOM,10); 
    191         diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE4,*bitmap_dices[3]),0,wxALL,3); 
    192         diceSizer->Add(new wxCheckBox(panel, ID_DICE4KEEP, wxT("Keep")),0,wxBOTTOM,10); 
    193         diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE5,*bitmap_dices[4]),0,wxALL,3); 
    194         diceSizer->Add(new wxCheckBox(panel, ID_DICE5KEEP, wxT("Keep")),0,wxBOTTOM,10); 
    195         diceSizer->Add(new wxButton(panel, ID_ROLL, wxT("Roll")),0,wxALL,3); 
    196         /*===> END layout for the dice section of the score board *******/ 
     194        if (m_horizontallayout) { 
     195                diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE1,*bitmap_dices[0]),0,wxALL,3); 
     196                diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE2,*bitmap_dices[1]),0,wxALL,3); 
     197                diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE3,*bitmap_dices[2]),0,wxALL,3); 
     198                diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE4,*bitmap_dices[3]),0,wxALL,3); 
     199                diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE5,*bitmap_dices[4]),0,wxALL,3); 
     200                diceSizer->Add(new wxButton(panel, ID_ROLL, wxT("Roll!"),wxDefaultPosition,wxSize(64,64)),0,wxALL,3); 
     201                diceSizer->Add(new wxCheckBox(panel, ID_DICE1KEEP, wxT("Keep")),0,wxBOTTOM,10); 
     202                diceSizer->Add(new wxCheckBox(panel, ID_DICE2KEEP, wxT("Keep")),0,wxBOTTOM,10); 
     203                diceSizer->Add(new wxCheckBox(panel, ID_DICE3KEEP, wxT("Keep")),0,wxBOTTOM,10); 
     204                diceSizer->Add(new wxCheckBox(panel, ID_DICE4KEEP, wxT("Keep")),0,wxBOTTOM,10); 
     205                diceSizer->Add(new wxCheckBox(panel, ID_DICE5KEEP, wxT("Keep")),0,wxBOTTOM,10); 
     206        } else { 
     207                diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE1,*bitmap_dices[0]),0,wxALL,3); 
     208                diceSizer->Add(new wxCheckBox(panel, ID_DICE1KEEP, wxT("Keep")),0,wxBOTTOM,10); 
     209                diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE2,*bitmap_dices[1]),0,wxALL,3); 
     210                diceSizer->Add(new wxCheckBox(panel, ID_DICE2KEEP, wxT("Keep")),0,wxBOTTOM,10); 
     211                diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE3,*bitmap_dices[2]),0,wxALL,3); 
     212                diceSizer->Add(new wxCheckBox(panel, ID_DICE3KEEP, wxT("Keep")),0,wxBOTTOM,10); 
     213                diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE4,*bitmap_dices[3]),0,wxALL,3); 
     214                diceSizer->Add(new wxCheckBox(panel, ID_DICE4KEEP, wxT("Keep")),0,wxBOTTOM,10); 
     215                diceSizer->Add(new wxDynamicBitmap(panel,ID_DICE5,*bitmap_dices[4]),0,wxALL,3); 
     216                diceSizer->Add(new wxCheckBox(panel, ID_DICE5KEEP, wxT("Keep")),0,wxBOTTOM,10); 
     217                diceSizer->Add(new wxButton(panel, ID_ROLL, wxT("Roll!"),wxDefaultPosition,wxSize(64,64)),0,wxALL,3); 
     218        } 
     219        //END layout for the dice section of the score board *******/ 
    197220 
    198221         
  • trunk/OpenYahtzee/src/MainFrame.h

    r85 r87  
    9898        bool m_calculatesubtotal; //sets whether to calculate the subtotal after every score or not 
    9999 
     100        bool m_horizontallayout; 
     101 
    100102}; 
    101103#endif 
Note: See TracChangeset for help on using the changeset viewer.