From 11a46aadf7c80d6b67af0c1094c8c5c4222bd3b1 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sun, 25 Dec 2022 12:54:04 +0100 Subject: [PATCH] Update database --- src/gui.cpp | 42 ++-- src/gui.h | 2 + tools/wxFrameBuilder.fbp | 439 ++++++++++++++++++++++++++------------- 3 files changed, 324 insertions(+), 159 deletions(-) diff --git a/src/gui.cpp b/src/gui.cpp index 7390b73..f022fc8 100644 --- a/src/gui.cpp +++ b/src/gui.cpp @@ -574,37 +574,51 @@ TabBase_TabImport::TabBase_TabImport( wxWindow* parent, wxWindowID id, const wxP wxBoxSizer* main_sizer; main_sizer = new wxBoxSizer( wxVERTICAL ); + from_game_label = new wxStaticText( this, wxID_ANY, wxT("From opened games"), wxDefaultPosition, wxDefaultSize, 0 ); + from_game_label->Wrap( -1 ); + main_sizer->Add( from_game_label, 0, wxALL, 5 ); + wxBoxSizer* top_sizer; top_sizer = new wxBoxSizer( wxHORIZONTAL ); - from_game_label = new wxStaticText( this, wxID_ANY, wxT("From opened games:"), wxDefaultPosition, wxDefaultSize, 0 ); - from_game_label->Wrap( -1 ); - top_sizer->Add( from_game_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - opened_game_list = new wxComboBox( this, wxID_ANY, wxT("No game opened"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); top_sizer->Add( opened_game_list, 100, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - import_from_game_button = new wxButton( this, wxID_ANY, wxT("Import"), wxDefaultPosition, wxDefaultSize, 0 ); - top_sizer->Add( import_from_game_button, 0, wxALL, 5 ); + import_from_game_button = new wxButton( this, wxID_ANY, wxT("Import Game"), wxDefaultPosition, wxDefaultSize, 0 ); + top_sizer->Add( import_from_game_button, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); - main_sizer->Add( top_sizer, 1, wxEXPAND, 5 ); + main_sizer->Add( top_sizer, 1, wxALIGN_TOP|wxEXPAND, 5 ); m_staticline4 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); main_sizer->Add( m_staticline4, 0, wxEXPAND | wxALL, 5 ); - wxBoxSizer* bottom_sizer; - bottom_sizer = new wxBoxSizer( wxHORIZONTAL ); - - from_db_label = new wxStaticText( this, wxID_ANY, wxT("From opened databases:"), wxDefaultPosition, wxDefaultSize, 0 ); + from_db_label = new wxStaticText( this, wxID_ANY, wxT("From opened databases"), wxDefaultPosition, wxDefaultSize, 0 ); from_db_label->Wrap( -1 ); - bottom_sizer->Add( from_db_label, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 ); + main_sizer->Add( from_db_label, 0, wxALL, 5 ); + + wxBoxSizer* bottom_sizer; + bottom_sizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bSizer33; + bSizer33 = new wxBoxSizer( wxHORIZONTAL ); + + opened_db_list = new wxComboBox( this, wxID_ANY, wxT("No database opened"), wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + bSizer33->Add( opened_db_list, 100, wxALL|wxEXPAND, 5 ); + + import_from_db_button = new wxButton( this, wxID_ANY, wxT("Import Selected Games"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer33->Add( import_from_db_button, 0, wxALL, 5 ); - main_sizer->Add( bottom_sizer, 1, wxEXPAND, 5 ); + bottom_sizer->Add( bSizer33, 1, wxEXPAND, 5 ); game_list = new wxListCtrl( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_ICON ); - main_sizer->Add( game_list, 20, wxALL|wxEXPAND, 5 ); + game_list->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_INACTIVECAPTIONTEXT ) ); + + bottom_sizer->Add( game_list, 20, wxALL|wxEXPAND, 5 ); + + + main_sizer->Add( bottom_sizer, 100, wxEXPAND, 5 ); this->SetSizer( main_sizer ); diff --git a/src/gui.h b/src/gui.h index 5ed2a05..7df677d 100644 --- a/src/gui.h +++ b/src/gui.h @@ -337,6 +337,8 @@ class TabBase_TabImport : public wxPanel wxButton* import_from_game_button; wxStaticLine* m_staticline4; wxStaticText* from_db_label; + wxComboBox* opened_db_list; + wxButton* import_from_db_button; wxListCtrl* game_list; public: diff --git a/tools/wxFrameBuilder.fbp b/tools/wxFrameBuilder.fbp index 3087087..78addc4 100644 --- a/tools/wxFrameBuilder.fbp +++ b/tools/wxFrameBuilder.fbp @@ -5698,76 +5698,76 @@ main_sizer wxVERTICAL none + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + From opened games + 0 + + 0 + + + 0 + + 1 + from_game_label + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + + + -1 + + 5 - wxEXPAND + wxALIGN_TOP|wxEXPAND 1 top_sizer wxHORIZONTAL none - - 5 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - From opened games: - 0 - - 0 - - - 0 - - 1 - from_game_label - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - 5 wxALIGN_CENTER_VERTICAL|wxALL @@ -5835,7 +5835,7 @@ 5 - wxALL + wxALIGN_CENTER_VERTICAL|wxALL 0 1 @@ -5871,7 +5871,7 @@ 0 0 wxID_ANY - Import + Import Game 0 @@ -5968,81 +5968,9 @@ 5 - wxEXPAND - 1 - - - bottom_sizer - wxHORIZONTAL - none - - 5 - wxALIGN_CENTER_VERTICAL|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - From opened databases: - 0 - - 0 - - - 0 - - 1 - from_db_label - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - - - -1 - - - - - - 5 - wxALL|wxEXPAND - 20 - + wxALL + 0 + 1 1 1 @@ -6070,6 +5998,8 @@ 0 0 wxID_ANY + From opened databases + 0 0 @@ -6077,7 +6007,7 @@ 0 1 - game_list + from_db_label 1 @@ -6087,17 +6017,236 @@ Resizable 1 - wxLC_ICON + ; ; forward_declare 0 - - wxFILTER_NONE - wxDefaultValidator - + -1 + + + + 5 + wxEXPAND + 100 + + + bottom_sizer + wxVERTICAL + none + + 5 + wxEXPAND + 1 + + + bSizer33 + wxHORIZONTAL + none + + 5 + wxALL|wxEXPAND + 100 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + opened_db_list + 1 + + + protected + 1 + + Resizable + -1 + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + No database opened + + + + + + + 5 + wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + 0 + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + Import Selected Games + + 0 + + 0 + + + 0 + + 1 + import_from_db_button + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + 5 + wxALL|wxEXPAND + 20 + + 1 + 1 + 1 + 1 + + + + + + wxSYS_COLOUR_INACTIVECAPTIONTEXT + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + game_list + 1 + + + protected + 1 + + Resizable + 1 + + wxLC_ICON + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + +