diff options
Diffstat (limited to 'src/game_tab/left_panel/board/BoardCanvas.hpp')
| -rw-r--r-- | src/game_tab/left_panel/board/BoardCanvas.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game_tab/left_panel/board/BoardCanvas.hpp b/src/game_tab/left_panel/board/BoardCanvas.hpp index 4a610aa..ee3dc29 100644 --- a/src/game_tab/left_panel/board/BoardCanvas.hpp +++ b/src/game_tab/left_panel/board/BoardCanvas.hpp @@ -41,8 +41,13 @@ wxDECLARE_EVENT(NEXT_MOVE_EVENT, wxCommandEvent); typedef std::tuple<short, short, short> ClockTime; class BoardCanvas : public wxPanel { + // *t is theme for board+pieces and + // *t_captures is theme for captured pieces (scale down version of t) Theme *t, *t_captures; + // Board to draw (char version) std::string board; + + // Various canvas state variables bool black_side, is_dragging, valid_drag, is_black_turn; std::uint32_t boardX, boardY, square_width, mouseX, mouseY, lastClickX, lastClickY; @@ -52,6 +57,7 @@ class BoardCanvas : public wxPanel { ClockTime black_time, white_time; bool frozen,lock_square_size; + // Drawing buffer wxBitmap *buffer; public: @@ -59,7 +65,7 @@ public: BoardCanvas(wxFrame *parent,std::uint32_t square_width, bool frozen); ~BoardCanvas(); void ApplyPreferences(); - void DrawBoard(wxBufferedPaintDC &dc); + void DrawBoard(wxDC &dc); void OnPaint(wxPaintEvent &event); void OnKeyEvent(wxKeyEvent &event); void MouseEvent(wxMouseEvent &event); |
