diff options
| author | Loic Guegan <manzerbredes@mailbox.org> | 2023-01-09 13:13:03 +0100 |
|---|---|---|
| committer | Loic Guegan <manzerbredes@mailbox.org> | 2023-01-09 13:13:03 +0100 |
| commit | 445cc09d01f8e3beeb406e175b5a98d6be58ea9a (patch) | |
| tree | da4073002ad070cf6e10112f188da0d4a1daeee4 /src/game_tab/left_panel/GameTabLeftPanel.cpp | |
| parent | 741dc8a52eb0c1e8b70f5e06e7d43db939e64f21 (diff) | |
Debug BoardCanvas DragNDrop and highlight last played move
Diffstat (limited to 'src/game_tab/left_panel/GameTabLeftPanel.cpp')
| -rw-r--r-- | src/game_tab/left_panel/GameTabLeftPanel.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game_tab/left_panel/GameTabLeftPanel.cpp b/src/game_tab/left_panel/GameTabLeftPanel.cpp index 25ded2c..5b8162c 100644 --- a/src/game_tab/left_panel/GameTabLeftPanel.cpp +++ b/src/game_tab/left_panel/GameTabLeftPanel.cpp @@ -107,6 +107,15 @@ void GameTabLeftPanel::Notify(bool skip_animation) { gs.black=game->GetTag("Black"); gs.mat_black=game->IsCheckmate(true); gs.mat_white=game->IsCheckmate(false); + if(m){ + // There should be a valid src_hl or dst_hl ortherwise it explode: + std::string src_hl, dst_hl; + m->GetAbsoluteMove(src_hl,dst_hl); + if(src_hl.size()>0){ // Just in case + gs.squares_hl.push_back(src_hl+"d"); + gs.squares_hl.push_back(dst_hl+"a"); + } + } if(skip_animation || !animate){ board_canvas->SetupBoard(gs); } |
