diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-24 12:09:21 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-24 12:09:21 +0100 |
| commit | 40c6df0e7c3f17204a6187eb2bc241f396720272 (patch) | |
| tree | 52d97a27c701b31ef6cd833f84a4eefc3e7f826a /src/base_tab/BaseTab.cpp | |
| parent | 32a0b3e31f1bb0024e96915f58afd991a992d945 (diff) | |
Improve BaseTab implementation for PGN files
Diffstat (limited to 'src/base_tab/BaseTab.cpp')
| -rw-r--r-- | src/base_tab/BaseTab.cpp | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/src/base_tab/BaseTab.cpp b/src/base_tab/BaseTab.cpp index 9c46d9b..9be9274 100644 --- a/src/base_tab/BaseTab.cpp +++ b/src/base_tab/BaseTab.cpp @@ -3,7 +3,20 @@ BaseTab::BaseTab(wxFrame *parent) : BasePanelBF(parent), TabInfos(TabInfos::BASE), base(NULL) { - LoadFile("/home/loic/text.PGn"); + + wxListItem col0; + col0.SetId(0); + col0.SetText(_("White")); + col0.SetWidth(200); + game_list->InsertColumn(0, col0); + + wxListItem col1; + col1.SetId(1); + col1.SetText(_("Black")); + col1.SetWidth(200); + game_list->InsertColumn(1, col1); + + //LoadFile("/home/loic/test.pgn"); } void BaseTab::ApplyPreferences() {} @@ -16,9 +29,9 @@ void BaseTab::LoadFile(std::string path) { } if (base != NULL) { - while(base->HasNextGame()){ - Game *g=base->GetNextGame(); - - } + while (base->HasNextGame()) { + Game *g = base->GetNextGame(); + long itemIndex = game_list->InsertItem(0, g->GetTag("White")); // want this for col. 1 + } } }
\ No newline at end of file |
