ochess/src/base_tab/AppendGameDialog.cpp

28 lines
807 B
C++
Raw Normal View History

2022-02-26 12:30:07 +01:00
#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();
}