diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-24 16:45:28 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2022-02-24 16:45:28 +0100 |
| commit | 829525acb94876a464a359548bce4faf0708bbc7 (patch) | |
| tree | 066e933cf54d3408a2e1cc408bbcc03961599562 /src/MainWindow.cpp | |
| parent | f99a7b699a6169003fc8b56f652de44c2e834ca5 (diff) | |
Update chessarbiter and improve pgn loader
Diffstat (limited to 'src/MainWindow.cpp')
| -rw-r--r-- | src/MainWindow.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 0a79bc2..5dbbf28 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -4,6 +4,7 @@ #include "preferences/preferences.hpp" wxDEFINE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent); +wxDEFINE_EVENT(NEW_GAME_EVENT, wxCommandEvent); /// ---------- MainWindow ---------- @@ -52,6 +53,7 @@ MainWindow::MainWindow() Bind(wxEVT_AUINOTEBOOK_PAGE_CHANGED, &MainWindow::OnPageChange, this, wxID_ANY); Bind(REFRESH_TAB_TITLE, &MainWindow::OnRefreshTabTitle, this, wxID_ANY); + Bind(NEW_GAME_EVENT, &MainWindow::OnNewGame2, this, wxID_ANY); Bind(wxEVT_CLOSE_WINDOW, &MainWindow::OnClose, this); } @@ -142,6 +144,11 @@ void MainWindow::OnNewGame(wxCommandEvent &event) { } } +void MainWindow::OnNewGame2(wxCommandEvent &event) { + Game *g=(Game*)event.GetClientData(); + NewGame(g); +} + void MainWindow::OnPageChange(wxAuiNotebookEvent &event) { TabInfos *infos = dynamic_cast<TabInfos *>(notebook->GetCurrentPage()); if (infos->type != TabInfos::GAME) { |
