Debug drawing canvas

This commit is contained in:
Loic Guegan 2023-01-01 20:28:39 +01:00
parent 29d5850b2f
commit dd24427d81
3 changed files with 8 additions and 2 deletions

View file

@ -16,7 +16,7 @@ BoardCanvas::BoardCanvas(wxFrame *parent)
ApplyPreferences();
// The following should be called when using an EVT_PAINT handler
SetBackgroundStyle(wxBG_STYLE_PAINT);
adata.duration=5000;
adata.duration=200;
adata.duration_fast=80;
adata.fps=30;
adata.buffer=new wxBitmap(500,500,32);

View file

@ -134,6 +134,8 @@ bool Theme::Zoom(int amount) {
double width = skin_scaled['s']->GetWidth() + amount;
if(width<=20)
return false;
if(width>=180)
return false;
ResizeSquares(std::max(width, 1.0));
ResizePieces(std::max(width * PIECE_SIZE_FACTOR, 1.0));
return true;