lichess-org / flutter-chessground

Chessboard package for flutter
https://pub.dev/packages/chessground
GNU General Public License v3.0
46 stars 29 forks source link

Fixes #5 - add support for image overlay highlights #12

Closed csdodd closed 1 year ago

csdodd commented 1 year ago

The horsey theme uses images for square highlights as oppose to solid colors. This change introduces a new structure called HighlightDetails that allows for a theme to specify if it wishes to highlight using a solid color or an image.

When rendering, if an image is present, it will take precedent over a solid color.

When rendering a move, Horsey also differentiates between the square moved from and the square moved to -- this meant that a new field needed to be added to all themes to support this case.

Screenshot_20230508_205647