MainFrame: reorganise the UI.
Some of the widgets had wrong parents.
This commit is contained in:
parent
7553fdaa7d
commit
07ed391cf6
3 changed files with 1240 additions and 1183 deletions
|
@ -16,13 +16,14 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co
|
|||
wxBoxSizer* bSizerMain;
|
||||
bSizerMain = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
_managerBook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
_massPanel = new wxPanel( _managerBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerPanel;
|
||||
bSizerPanel = new wxBoxSizer( wxVERTICAL );
|
||||
_mainPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerMainPanel;
|
||||
bSizerMainPanel = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxBoxSizer* bSizerMainUi;
|
||||
bSizerMainUi = new wxBoxSizer( wxHORIZONTAL );
|
||||
_managerBook = new wxSimplebook( _mainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
|
||||
_massPanel = new wxPanel( _managerBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
|
||||
wxBoxSizer* bSizerMassPanel;
|
||||
bSizerMassPanel = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
wxStaticBoxSizer* sbSizerInstalled;
|
||||
sbSizerInstalled = new wxStaticBoxSizer( new wxStaticBox( _massPanel, wxID_ANY, wxT("Installed M.A.S.S.es") ), wxVERTICAL );
|
||||
|
@ -60,7 +61,7 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co
|
|||
sbSizerInstalled->Add( bSizerSecondRow, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
bSizerMainUi->Add( sbSizerInstalled, 1, wxEXPAND|wxALL, 5 );
|
||||
bSizerMassPanel->Add( sbSizerInstalled, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
wxBoxSizer* bSizerImportExport;
|
||||
bSizerImportExport = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -77,7 +78,7 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co
|
|||
bSizerImportExport->Add( _exportButton, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMainUi->Add( bSizerImportExport, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
bSizerMassPanel->Add( bSizerImportExport, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
wxStaticBoxSizer* sbSizerStagingArea;
|
||||
sbSizerStagingArea = new wxStaticBoxSizer( new wxStaticBox( _massPanel, wxID_ANY, wxT("Staging area") ), wxVERTICAL );
|
||||
|
@ -92,26 +93,31 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co
|
|||
sbSizerStagingArea->Add( _stagingAreaButton, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bSizerMainUi->Add( sbSizerStagingArea, 1, wxEXPAND|wxALL, 5 );
|
||||
bSizerMassPanel->Add( sbSizerStagingArea, 1, wxEXPAND|wxALL, 5 );
|
||||
|
||||
|
||||
bSizerPanel->Add( bSizerMainUi, 1, wxEXPAND, 5 );
|
||||
_massPanel->SetSizer( bSizerMassPanel );
|
||||
_massPanel->Layout();
|
||||
bSizerMassPanel->Fit( _massPanel );
|
||||
_managerBook->AddPage( _massPanel, wxT("a page"), false );
|
||||
|
||||
_riskLabel = new wxStaticText( _massPanel, wxID_ANY, wxT("USE THIS TOOL AT YOUR OWN RISK!"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
|
||||
bSizerMainPanel->Add( _managerBook, 1, wxEXPAND, 5 );
|
||||
|
||||
_riskLabel = new wxStaticText( _mainPanel, wxID_ANY, wxT("USE THIS TOOL AT YOUR OWN RISK!"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
|
||||
_riskLabel->Wrap( -1 );
|
||||
_riskLabel->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
_riskLabel->SetForegroundColour( wxColour( 255, 0, 0 ) );
|
||||
|
||||
bSizerPanel->Add( _riskLabel, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
bSizerMainPanel->Add( _riskLabel, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
wxBoxSizer* bSizerGameStatus;
|
||||
bSizerGameStatus = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
_gameStatusLabel = new wxStaticText( _massPanel, wxID_ANY, wxT("Game status:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
_gameStatusLabel = new wxStaticText( _mainPanel, wxID_ANY, wxT("Game status:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
_gameStatusLabel->Wrap( -1 );
|
||||
bSizerGameStatus->Add( _gameStatusLabel, 1, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
|
||||
|
||||
_gameStatus = new wxStaticText( _massPanel, wxID_ANY, wxT("not running"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
_gameStatus = new wxStaticText( _mainPanel, wxID_ANY, wxT("not running"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
_gameStatus->Wrap( -1 );
|
||||
_gameStatus->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
|
||||
_gameStatus->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_CAPTIONTEXT ) );
|
||||
|
@ -119,22 +125,20 @@ MainFrame::MainFrame( wxWindow* parent, wxWindowID id, const wxString& title, co
|
|||
bSizerGameStatus->Add( _gameStatus, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bSizerPanel->Add( bSizerGameStatus, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
bSizerMainPanel->Add( bSizerGameStatus, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
_aboutText = new wxStaticText( _massPanel, wxID_ANY, wxT("This version of the application was tested on M.A.S.S. Builder early access version 0.3.7.\nIt may or may not work with other versions of the game.\nMade for the M.A.S.S. Builder community by Guillaume Jacquemin."), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
|
||||
_aboutText = new wxStaticText( _mainPanel, wxID_ANY, wxT("This version of the application was tested on M.A.S.S. Builder early access version 0.3.7.\nIt may or may not work with other versions of the game.\nMade for the M.A.S.S. Builder community by Guillaume Jacquemin."), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTER_HORIZONTAL );
|
||||
_aboutText->Wrap( -1 );
|
||||
bSizerPanel->Add( _aboutText, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
bSizerMainPanel->Add( _aboutText, 0, wxEXPAND|wxRIGHT|wxLEFT|wxALIGN_CENTER_HORIZONTAL, 5 );
|
||||
|
||||
_githubLink = new wxHyperlinkCtrl( _massPanel, wxID_ANY, wxT("https://github.com/williamjcm/wxMASSManager"), wxT("https://github.com/williamjcm/wxMASSManager"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
|
||||
bSizerPanel->Add( _githubLink, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
_githubLink = new wxHyperlinkCtrl( _mainPanel, wxID_ANY, wxT("https://github.com/williamjcm/wxMASSManager"), wxT("https://github.com/williamjcm/wxMASSManager"), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
|
||||
bSizerMainPanel->Add( _githubLink, 0, wxALIGN_CENTER_HORIZONTAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
_massPanel->SetSizer( bSizerPanel );
|
||||
_massPanel->Layout();
|
||||
bSizerPanel->Fit( _massPanel );
|
||||
_managerBook->AddPage( _massPanel, wxT("a page"), false );
|
||||
|
||||
bSizerMain->Add( _managerBook, 1, wxEXPAND, 5 );
|
||||
_mainPanel->SetSizer( bSizerMainPanel );
|
||||
_mainPanel->Layout();
|
||||
bSizerMainPanel->Fit( _mainPanel );
|
||||
bSizerMain->Add( _mainPanel, 1, wxEXPAND, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bSizerMain );
|
||||
|
|
2364
GUI/MainFrame.fbp
2364
GUI/MainFrame.fbp
File diff suppressed because it is too large
Load diff
|
@ -22,10 +22,10 @@
|
|||
#include <wx/sizer.h>
|
||||
#include <wx/statbox.h>
|
||||
#include <wx/listbox.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/hyperlink.h>
|
||||
#include <wx/panel.h>
|
||||
#include <wx/simplebook.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/hyperlink.h>
|
||||
#include <wx/timer.h>
|
||||
#include <wx/frame.h>
|
||||
|
||||
|
@ -40,6 +40,7 @@ class MainFrame : public wxFrame
|
|||
private:
|
||||
|
||||
protected:
|
||||
wxPanel* _mainPanel;
|
||||
wxSimplebook* _managerBook;
|
||||
wxPanel* _massPanel;
|
||||
wxListView* _installedListView;
|
||||
|
|
Loading…
Reference in a new issue