Improve engine support

This commit is contained in:
Loic Guegan 2022-02-26 17:05:47 +01:00
parent e5aa5be42c
commit 65e9049351
9 changed files with 761 additions and 10 deletions

View file

@ -1,5 +1,6 @@
#include "MainWindow.hpp"
#include "ChessArbiter.hpp"
#include "engine_tab/EngineTab.hpp"
#include "pgnp.hpp"
#include "preferences/preferences.hpp"
@ -40,11 +41,16 @@ MainWindow::MainWindow()
wxMenu *menuBase = new wxMenu;
menuBase->Append(5, "New", "Create new database");
// Engine menu
wxMenu *engineMenu = new wxMenu;
engineMenu->Append(6, "New", "Create a new engine configuration");
/// Menu bar
menuBar = new wxMenuBar;
menuBar->Append(menuFile, "&File");
menuBar->Append(menuGame, "&Game");
menuBar->Append(menuBase, "&Database");
menuBar->Append(engineMenu, "&Engines");
SetMenuBar(menuBar);
// Create the wxNotebook widget
@ -57,8 +63,12 @@ MainWindow::MainWindow()
Bind(NEW_GAME_EVENT, &MainWindow::OnNewGame, this, wxID_ANY);
Bind(wxEVT_CLOSE_WINDOW, &MainWindow::OnClose, this);
/*BaseTab *bt = new BaseTab((wxFrame *)notebook, "/home/loic/hartwig_tests.pgn");
notebook->AddPage(bt, bt->GetLabel());
/*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());
notebook->SetSelection(notebook->GetPageIndex(bt));*/
}