mirror of
https://gitlab.com/manzerbredes/ochess.git
synced 2025-04-07 02:26:29 +02:00
Add comments
This commit is contained in:
parent
15f713b58e
commit
35d9a6f0d9
2 changed files with 11 additions and 0 deletions
|
@ -14,6 +14,7 @@ BoardCanvas::BoardCanvas(wxFrame *parent)
|
||||||
ApplyPreferences();
|
ApplyPreferences();
|
||||||
// The following should be called when using an EVT_PAINT handler
|
// The following should be called when using an EVT_PAINT handler
|
||||||
SetBackgroundStyle(wxBG_STYLE_PAINT);
|
SetBackgroundStyle(wxBG_STYLE_PAINT);
|
||||||
|
//buffer=new wxBitmap(500,500,32);
|
||||||
}
|
}
|
||||||
|
|
||||||
BoardCanvas::~BoardCanvas() {
|
BoardCanvas::~BoardCanvas() {
|
||||||
|
@ -44,6 +45,14 @@ void BoardCanvas::OnPaint(wxPaintEvent &event) {
|
||||||
if (boardY > canvas_size.y)
|
if (boardY > canvas_size.y)
|
||||||
boardY = 0;
|
boardY = 0;
|
||||||
DrawBoard(dc);
|
DrawBoard(dc);
|
||||||
|
|
||||||
|
// TODO: Make DrawBoard() drawing into wxMemoryDC!
|
||||||
|
/*wxMemoryDC dc2(*buffer);
|
||||||
|
dc2.SetBackgroundMode(wxTRANSPARENT);
|
||||||
|
dc2.SetPen(wxPen(*wxBLACK, 3));
|
||||||
|
dc2.DrawRectangle(10,10,100,100);
|
||||||
|
dc.Blit(0, 0, 500,500, (wxDC*)&dc2,0,0);*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BoardCanvas::ApplyPreferences() {
|
void BoardCanvas::ApplyPreferences() {
|
||||||
|
|
|
@ -52,6 +52,8 @@ class BoardCanvas : public wxPanel {
|
||||||
ClockTime black_time, white_time;
|
ClockTime black_time, white_time;
|
||||||
bool frozen,lock_square_size;
|
bool frozen,lock_square_size;
|
||||||
|
|
||||||
|
wxBitmap *buffer;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BoardCanvas(wxFrame *parent);
|
BoardCanvas(wxFrame *parent);
|
||||||
BoardCanvas(wxFrame *parent,std::uint32_t square_width, bool frozen);
|
BoardCanvas(wxFrame *parent,std::uint32_t square_width, bool frozen);
|
||||||
|
|
Loading…
Add table
Reference in a new issue