From 3efabf1c331bef94d27e2818ab734a02dc401dfe Mon Sep 17 00:00:00 2001 From: Loic Guegan Date: Thu, 29 Dec 2022 10:08:22 +0100 Subject: Implement pieces move animations --- src/game_tab/left_panel/board/BoardCanvas.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/game_tab/left_panel/board/BoardCanvas.hpp') diff --git a/src/game_tab/left_panel/board/BoardCanvas.hpp b/src/game_tab/left_panel/board/BoardCanvas.hpp index 9e375d1..1da45b2 100644 --- a/src/game_tab/left_panel/board/BoardCanvas.hpp +++ b/src/game_tab/left_panel/board/BoardCanvas.hpp @@ -60,14 +60,13 @@ class BoardCanvas : public wxPanel { // Drawing buffer (ANIMATIONS) wxBitmap *buffer; bool reuseBuffer; - wxTimer timer; - int frame,duration,fps; + int frame,duration,fps,duration_fast; std::string final_board; bool final_is_black_turn; std::map final_captures; - std::string src; - std::string dst; char piece_moved; + wxPoint src; + wxPoint transVect; public: BoardCanvas(wxFrame *parent); @@ -82,7 +81,7 @@ public: void Swap(); void SetupBoard(std::string board, bool is_black_turn, std::map captures); - void Animate(std::string board, bool is_black_turn, std::map captures, std::string src, std::string dst); + void Animate(std::string board, bool is_black_turn, std::map captures, std::string src, std::string dst,bool faster); void SetClockTime(short hours, short min, short sec, bool IsBlack); DECLARE_EVENT_TABLE() }; -- cgit v1.2.3