aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/left_panel/GameTabLeftPanel.cpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-01-01 14:12:57 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2023-01-01 14:12:57 +0100
commit679c735596168228ad0df4e42a3768c61c809a40 (patch)
treeacec93ad61c3ba26a997a3835079c48fcf911d72 /src/game_tab/left_panel/GameTabLeftPanel.cpp
parent8bf9e7e7b5b963b8be3916c4926e9cade3064eb8 (diff)
Improve game tab
Diffstat (limited to 'src/game_tab/left_panel/GameTabLeftPanel.cpp')
-rw-r--r--src/game_tab/left_panel/GameTabLeftPanel.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/game_tab/left_panel/GameTabLeftPanel.cpp b/src/game_tab/left_panel/GameTabLeftPanel.cpp
index 50919c0..b1bf516 100644
--- a/src/game_tab/left_panel/GameTabLeftPanel.cpp
+++ b/src/game_tab/left_panel/GameTabLeftPanel.cpp
@@ -72,14 +72,28 @@ void GameTabLeftPanel::OnPlay(wxCommandEvent &event) {
}
void GameTabLeftPanel::Notify(bool animate, bool backward) {
+ wxLogDebug("Called!");
// Update fen and captures
std::string fen = game->GetFen();
std::map<char, std::uint8_t> captures;
HalfMove *m = game->GetCurrentMove();
+ //animate=false;
+ //backward=false;
if (m != nullptr) {
captures = m->GetLineCaptures();
+ /*HalfMove *parent=m->GetParent();
+ if(!parent){
+ animate=true;
+ }
+ if(last_absolute_move == parent->GetAbsoluteMove()){
+ wxLogDebug("Next true!");
+ animate=true;
+ } else if(m->GetAbsoluteMove() == last_absolute_move){
+ animate=true;
+ backward=true;
+ }*/
}
-
+
// Update board canvas:
if(!animate){
if(m){