diff options
Diffstat (limited to 'src/game_tab/left_panel/board/BoardCanvas.hpp')
| -rw-r--r-- | src/game_tab/left_panel/board/BoardCanvas.hpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/game_tab/left_panel/board/BoardCanvas.hpp b/src/game_tab/left_panel/board/BoardCanvas.hpp index 553994c..bc850b7 100644 --- a/src/game_tab/left_panel/board/BoardCanvas.hpp +++ b/src/game_tab/left_panel/board/BoardCanvas.hpp @@ -35,6 +35,8 @@ wxDECLARE_EVENT(PLAY_MOVE_EVENT, wxCommandEvent); #define CAPTURE_FACTOR 0.35 #define SQUARE_NUM_PADDING 5 +#define DEFAULT_ARROW(SRC,DST) {(SRC),(DST),wxNullColour,1} +#define DEFAULT_SQUARE(SQUARE) {(SQUARE),wxNullColour} typedef std::tuple<short, short, short> ClockTime; @@ -61,11 +63,20 @@ typedef struct AnimState { } AnimState; typedef struct GameState { + typedef struct Arrow { + std::string src,dst; + wxColour color=wxNullColour; + float scale=1; + } Arrow; + typedef struct Square { + std::string square; + wxColour color=wxNullColour; + } Square; std::string white, black; std::string board; std::map<char, std::uint8_t> captures; - std::vector<std::string> squares_hl; - std::vector<std::string> arrows; + std::vector<Square> squares_hl; + std::vector<Arrow> arrows; bool is_black_turn; bool mat_black; bool mat_white; @@ -78,10 +89,11 @@ class BoardCanvas : public wxPanel { Theme *t, *t_captures; wxColour color_arrows; int arrows_offset; + std::uint8_t arrow_thickness; std::string white_player,black_player; // Current highlighted squares and arrows: - std::vector<std::string> squares_hl; - std::vector<std::string> arrows; + std::vector<GameState::Square> squares_hl; + std::vector<GameState::Arrow> arrows; // Various canvas state variables bool black_side, is_dragging, valid_drag, arrow_drag, is_black_turn; |
