mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-18 03:42:02 +00:00
28 lines
807 B
C++
28 lines
807 B
C++
![]() |
#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();
|
||
|
}
|