6#include <unordered_map>
10#define PIECE_SIZE_FACTOR 0.8
11#define MAT_SIZE_FACTOR 0.4
12#define DEFAULT_PIECE_THEME "assets/pieces/cburnett.png"
13#define DEFAULT_SQUARE_THEME "assets/boards/chesscom_8bits.png"
21 std::unordered_map<char, wxImage> skin;
22 std::unordered_map<char, wxBitmap *> skin_scaled;
23 std::uint8_t square_radius;
24 wxMask *RoundedMask(std::uint32_t width, std::uint8_t corner);
29 Theme(std::string piece, std::string square);
43 std::uint8_t GetSquareRadius();
44 bool Zoom(
int amount);
53 wxBitmap *
Get(
char c);
The in memory board theme (used by BoardCanvas)
Definition: Theme.hpp:19
void LoadSquaresSkin(wxImage iskin)
Load square skin image (break the 2 square tiles into individual squares)
Definition: Theme.cpp:83
void LoadPiecesSkin(wxImage skin)
Load piece skin image (break image tile into individual pieces)
Definition: Theme.cpp:49
void ResizeSquares(std::uint32_t width)
Set squares width.
Definition: Theme.cpp:120
wxBitmap * Get(char c)
Get bitmap of an element.
Definition: Theme.cpp:96
void ResizeSquaresAndPieces(std::uint32_t width)
Set square width and adjust piece size accordingly.
Definition: Theme.cpp:115
void ResizePieces(std::uint32_t width)
Set pieces width.
Definition: Theme.cpp:98
void SetSquareRadius(std::uint8_t radius)
Having rounded corners on squares.
Definition: Theme.cpp:152
double GetPiecesSizes()
Definition: Theme.cpp:161
double GetSquaresSizes()
Definition: Theme.cpp:167