diff options
Diffstat (limited to 'src/base_tab/AppendGameDialog.cpp')
| -rw-r--r-- | src/base_tab/AppendGameDialog.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/base_tab/AppendGameDialog.cpp b/src/base_tab/AppendGameDialog.cpp new file mode 100644 index 0000000..8a76028 --- /dev/null +++ b/src/base_tab/AppendGameDialog.cpp @@ -0,0 +1,28 @@ +#include "AppendGameDialog.hpp" +#include "MainWindow.hpp" +#include "ochess.hpp" + +AppendGameDialog::AppendGameDialog(wxWindow *parent, GameBase *base) + : AppendGameDialogBF(parent), base(base) { + + tinfos = MAINWIN->ListTabInfos(); + for (TabInfos *i : tinfos) { + wxWindow *win = dynamic_cast<wxWindow *>(i); + game_list->Append(win->GetLabel()); + } + + Bind(wxEVT_BUTTON, &AppendGameDialog::OnCancel, this, + ID_DIALOG_CANCEL_BUTTON); + Bind(wxEVT_BUTTON, &AppendGameDialog::OnImport, this, + ID_DIALOG_IMPORT_BUTTON); +} + +void AppendGameDialog::OnCancel(wxCommandEvent &event) { this->Close(); } + +void AppendGameDialog::OnImport(wxCommandEvent &event) { + std::vector<std::uint32_t> to_ignore; + std::vector<GameBase *> new_games_bases; + std::vector<Game *> new_games; + + this->Close(); +}
\ No newline at end of file |
