From 65e9049351130ff54b305dd8c82c969456a0797b Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Sat, 26 Feb 2022 17:05:47 +0100 Subject: Improve engine support --- src/MainWindow.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'src/MainWindow.cpp') diff --git a/src/MainWindow.cpp b/src/MainWindow.cpp index 407ec80..b3ed9c4 100644 --- a/src/MainWindow.cpp +++ b/src/MainWindow.cpp @@ -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));*/ } -- cgit v1.2.3