diff options
Diffstat (limited to 'src/game_tab/left_panel')
| -rw-r--r-- | src/game_tab/left_panel/GameTabLeftPanel.cpp | 6 | ||||
| -rw-r--r-- | src/game_tab/left_panel/GameTabLeftPanel.hpp | 4 |
2 files changed, 9 insertions, 1 deletions
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<std::string> 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; diff --git a/src/game_tab/left_panel/GameTabLeftPanel.hpp b/src/game_tab/left_panel/GameTabLeftPanel.hpp index 578f8c4..2dec70d 100644 --- a/src/game_tab/left_panel/GameTabLeftPanel.hpp +++ b/src/game_tab/left_panel/GameTabLeftPanel.hpp @@ -13,7 +13,8 @@ class GameTabLeftPanel : public TabGameLeftPanel { BoardCanvas *board_canvas; bool repeat; HalfMove *last_move; - + std::vector<std::string> engine_arrows; + public: GameTabLeftPanel(wxFrame *parent, std::shared_ptr<Game> game); void Notify(bool skip_animation=false); @@ -22,4 +23,5 @@ public: void OnRefreshBoard(wxCommandEvent &event); void ApplyPreferences(); void SetSaveToolEnable(bool state){game_toolbar->EnableTool(0,state);}; + void SetEngineArrows(std::vector<std::string> arrows); };
\ No newline at end of file |
