aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/GameTab.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/game_tab/GameTab.cpp')
-rw-r--r--src/game_tab/GameTab.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/game_tab/GameTab.cpp b/src/game_tab/GameTab.cpp
index 79f6794..def90f8 100644
--- a/src/game_tab/GameTab.cpp
+++ b/src/game_tab/GameTab.cpp
@@ -2,6 +2,7 @@
#include <wx/clipbrd.h>
wxDEFINE_EVENT(GAME_CHANGE, wxCommandEvent);
+wxDEFINE_EVENT(SHOW_ENGINE_EVALUATION, wxCommandEvent);
GameTab::GameTab(wxFrame *parent, std::shared_ptr<Game> game)
: wxPanel(parent), game(game), TabInfos(TabInfos::GAME) {
@@ -27,6 +28,11 @@ GameTab::GameTab(wxFrame *parent, std::shared_ptr<Game> game)
board_panel->Bind(wxEVT_TOOL,&GameTab::OnToolClick,this);
Bind(GAME_CHANGE, &GameTab::OnGameChange, this, wxID_ANY);
+ Bind(SHOW_ENGINE_EVALUATION, [p=this](wxCommandEvent &event){
+ EngineEvaluation *eval=(EngineEvaluation*)(event.GetClientData());
+ p->board_panel->SetEngineArrows(eval->best_lines);
+ free(eval);
+ });
}
void GameTab::OnToolClick(wxCommandEvent &event){