mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-19 04:09:41 +00:00
Update chessarbiter and improve pgn loader
This commit is contained in:
parent
f99a7b699a
commit
829525acb9
8 changed files with 29 additions and 10 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue