From 4adb5ff056d4a5a35cd7f76a9785c5cab57fdc03 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Fri, 25 Feb 2022 09:21:26 +0100 Subject: Improve game base panel --- src/base_tab/BasePanelBF.cpp | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) (limited to 'src/base_tab/BasePanelBF.cpp') diff --git a/src/base_tab/BasePanelBF.cpp b/src/base_tab/BasePanelBF.cpp index c6b8381..e179ec0 100644 --- a/src/base_tab/BasePanelBF.cpp +++ b/src/base_tab/BasePanelBF.cpp @@ -17,13 +17,8 @@ BasePanelBF::BasePanelBF( wxWindow* parent, wxWindowID id, const wxPoint& pos, c wxBoxSizer* top_sizer; top_sizer = new wxBoxSizer( wxHORIZONTAL ); - current_base_label = new wxStaticText( this, wxID_ANY, wxT("Current base:"), wxDefaultPosition, wxDefaultSize, 0 ); - current_base_label->Wrap( -1 ); - top_sizer->Add( current_base_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - - current_base = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - current_base->Enable( false ); - + current_base = new wxStaticText( this, wxID_ANY, wxT("unknown"), wxDefaultPosition, wxDefaultSize, 0 ); + current_base->Wrap( -1 ); top_sizer->Add( current_base, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); save_button = new wxButton( this, wxID_ANY, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -35,18 +30,36 @@ BasePanelBF::BasePanelBF( wxWindow* parent, wxWindowID id, const wxPoint& pos, c main_sizer->Add( top_sizer, 0, wxEXPAND, 5 ); - game_list = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLC_REPORT ); - main_sizer->Add( game_list, 1, wxALL|wxEXPAND, 5 ); + separator_1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + main_sizer->Add( separator_1, 0, wxEXPAND | wxALL, 5 ); wxBoxSizer* bottom_sizer; bottom_sizer = new wxBoxSizer( wxHORIZONTAL ); + append_choice_label = new wxStaticText( this, wxID_ANY, wxT("Import games from:"), wxDefaultPosition, wxDefaultSize, 0 ); + append_choice_label->Wrap( -1 ); + bottom_sizer->Add( append_choice_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + wxArrayString append_choiceChoices; + append_choice = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, append_choiceChoices, 0 ); + append_choice->SetSelection( 0 ); + bottom_sizer->Add( append_choice, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + + append_button = new wxButton( this, wxID_ANY, wxT("Append"), wxDefaultPosition, wxDefaultSize, 0 ); + bottom_sizer->Add( append_button, 0, wxALL, 5 ); + + + bottom_sizer->Add( 0, 0, 1, wxEXPAND, 5 ); + delete_button = new wxButton( this, wxID_ANY, wxT("Delete selection"), wxDefaultPosition, wxDefaultSize, 0 ); bottom_sizer->Add( delete_button, 0, wxALL, 5 ); main_sizer->Add( bottom_sizer, 0, wxEXPAND, 5 ); + game_list = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxLC_REPORT ); + main_sizer->Add( game_list, 1, wxALL|wxEXPAND, 5 ); + this->SetSizer( main_sizer ); this->Layout(); -- cgit v1.2.3