From f4108bc06cd9fa1977267836e9176118e8863b57 Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Mon, 9 Jan 2023 16:36:48 +0100 Subject: Bind live engine analysis to BoardCanvas --- src/game_tab/left_panel/GameTabLeftPanel.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/game_tab/left_panel/GameTabLeftPanel.cpp') diff --git a/src/game_tab/left_panel/GameTabLeftPanel.cpp b/src/game_tab/left_panel/GameTabLeftPanel.cpp index 5b8162c..c7be112 100644 --- a/src/game_tab/left_panel/GameTabLeftPanel.cpp +++ b/src/game_tab/left_panel/GameTabLeftPanel.cpp @@ -71,6 +71,11 @@ void GameTabLeftPanel::OnPlay(wxCommandEvent &event) { Notify(true); // Redraw event is move failed! Otherwise piece not resets to it initial position after dragging } +void GameTabLeftPanel::SetEngineArrows(std::vector arrows){ + engine_arrows=arrows; + Notify(true); +} + void GameTabLeftPanel::Notify(bool skip_animation) { // Update fen and captures std::string fen = game->GetFen(); @@ -107,6 +112,7 @@ void GameTabLeftPanel::Notify(bool skip_animation) { gs.black=game->GetTag("Black"); gs.mat_black=game->IsCheckmate(true); gs.mat_white=game->IsCheckmate(false); + gs.arrows=engine_arrows; if(m){ // There should be a valid src_hl or dst_hl ortherwise it explode: std::string src_hl, dst_hl; -- cgit v1.2.3