aboutsummaryrefslogtreecommitdiff
path: root/src/game_tab/left_panel/board/BoardCanvas.hpp
diff options
context:
space:
mode:
authorLoic Guegan <manzerbredes@mailbox.org>2023-01-06 16:01:11 +0100
committerLoic Guegan <manzerbredes@mailbox.org>2023-01-06 16:01:11 +0100
commit8703e306f7649dbff15eb0b5fe61ab7ee1423c01 (patch)
treec3d0445d24eb595436920dbc1febe74caadc6158 /src/game_tab/left_panel/board/BoardCanvas.hpp
parentb97dedf9f1d2a2e4cf68f9324090f3ceacc294e1 (diff)
Improve BoardCanvas
Diffstat (limited to 'src/game_tab/left_panel/board/BoardCanvas.hpp')
-rw-r--r--src/game_tab/left_panel/board/BoardCanvas.hpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/game_tab/left_panel/board/BoardCanvas.hpp b/src/game_tab/left_panel/board/BoardCanvas.hpp
index 2d2b01c..f53bb8f 100644
--- a/src/game_tab/left_panel/board/BoardCanvas.hpp
+++ b/src/game_tab/left_panel/board/BoardCanvas.hpp
@@ -34,6 +34,7 @@ wxDECLARE_EVENT(PLAY_MOVE_EVENT, wxCommandEvent);
#define CAPTURE_FACTOR 0.35
#define SQUARE_NUM_PADDING 5
+
typedef std::tuple<short, short, short> ClockTime;
// Drawing buffer (ANIMATIONS)
@@ -62,6 +63,7 @@ typedef struct GameState {
std::string white, black;
std::string board;
std::map<char, std::uint8_t> captures;
+ std::vector<std::string> squares_hl;
bool is_black_turn;
bool mat_black;
bool mat_white;
@@ -78,7 +80,7 @@ class BoardCanvas : public wxPanel {
// Various canvas state variables
bool black_side, is_dragging, valid_drag, is_black_turn;
- std::uint32_t boardX, boardY, square_width, mouseX, mouseY, lastClickX,
+ std::uint32_t boardX, boardY, square_width, piece_width, mouseX, mouseY, lastClickX,
lastClickY;
wxSize canvas_size;
wxPoint active_square;