feat: glossy tile rendering and per-season theme colors

Introduces candy-gloss tile rendering (diagonal gradient + glass highlight
+ optional glow) via a shared paintGlossyTile() in tile_painter.dart,
applied to board filled-cells and tray/drag-overlay pieces. Adds
ThemeColors to palette.dart for UI-layer season color resolution, and
activeThemeProvider for one-call access to the active season's theme.
Regenerates the game_screen golden to reflect the new look.
This commit is contained in:
2026-06-11 21:06:26 +09:00
parent 6bb1eac28c
commit 8739fc0e26
6 changed files with 104 additions and 32 deletions
+6 -11
View File
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
import '../../game/models/piece.dart';
import '../theme/palette.dart';
import 'tile_painter.dart';
/// Draws a piece as rounded tiles at a given cell size; reused by the tray,
/// the drag overlay, and ghost previews.
@@ -12,8 +13,6 @@ void paintPiece(
Offset origin = Offset.zero,
Color? overrideColor,
}) {
final paint = Paint()
..color = overrideColor ?? GamePalette.tile(piece.colorId);
final inset = cellSize * 0.05;
final radius = Radius.circular(cellSize * 0.18);
for (final (dx, dy) in piece.offsets) {
@@ -23,17 +22,13 @@ void paintPiece(
cellSize - inset * 2,
cellSize - inset * 2,
);
canvas.drawRRect(RRect.fromRectAndRadius(rect, radius), paint);
if (overrideColor == null) {
// Subtle top highlight for depth.
final highlight = Paint()..color = Colors.white.withValues(alpha: 0.18);
if (overrideColor != null) {
canvas.drawRRect(
RRect.fromRectAndRadius(
Rect.fromLTWH(rect.left, rect.top, rect.width, rect.height * 0.32),
radius,
),
highlight,
RRect.fromRectAndRadius(rect, radius),
Paint()..color = overrideColor,
);
} else {
paintGlossyTile(canvas, rect, GamePalette.tile(piece.colorId));
}
}
}