mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-19 04:09:41 +00:00
Improve engine managemen
This commit is contained in:
parent
ca6c1b1e75
commit
e601902dd5
11 changed files with 146 additions and 16 deletions
|
@ -7,6 +7,7 @@
|
|||
|
||||
wxDEFINE_EVENT(REFRESH_TAB_TITLE, wxCommandEvent);
|
||||
wxDEFINE_EVENT(NEW_GAME_EVENT, wxCommandEvent);
|
||||
wxDEFINE_EVENT(CLOSE_TAB_EVENT, wxCommandEvent);
|
||||
|
||||
/// ---------- MainWindow ----------
|
||||
|
||||
|
@ -64,16 +65,24 @@ MainWindow::MainWindow()
|
|||
Bind(REFRESH_TAB_TITLE, &MainWindow::OnRefreshTabTitle, this, wxID_ANY);
|
||||
Bind(NEW_GAME_EVENT, &MainWindow::OnNewGame, this, wxID_ANY);
|
||||
Bind(wxEVT_CLOSE_WINDOW, &MainWindow::OnClose, this);
|
||||
Bind(CLOSE_TAB_EVENT, &MainWindow::OnCloseTabEvent, this, wxID_ANY);
|
||||
|
||||
/*BaseTab *bt = new BaseTab((wxFrame *)notebook,
|
||||
"/home/loic/hartwig_tests.pgn"); notebook->AddPage(bt, bt->GetLabel());
|
||||
notebook->SetSelection(notebook->GetPageIndex(bt));*/
|
||||
|
||||
/*EngineTab *bt = new EngineTab((wxWindow *)notebook,
|
||||
"/home/loic/.local/bin/stockfish"); notebook->AddPage(bt, bt->GetLabel());
|
||||
/*
|
||||
EngineTab *bt =
|
||||
new EngineTab((wxWindow *)notebook,
|
||||
new uciadapter::UCI("/home/loic/.local/bin/stockfish"),
|
||||
"/home/loic/.local/bin/stockfish");
|
||||
notebook->AddPage(bt, bt->GetLabel());
|
||||
notebook->SetSelection(notebook->GetPageIndex(bt));*/
|
||||
}
|
||||
|
||||
void MainWindow::OnCloseTabEvent(wxCommandEvent &event) {
|
||||
notebook->DeletePage(notebook->GetSelection());
|
||||
}
|
||||
|
||||
void MainWindow::OnNewEngine(wxCommandEvent &event) {
|
||||
wxFileDialog openFileDialog(this, _("Use engine"), "", "", "Executable|*",
|
||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue