Auto-sync: 20260314_180000

This commit is contained in:
Paolo 2026-03-14 18:00:00 +01:00
parent e1861031a8
commit bbcd80a6a9
2 changed files with 69 additions and 50 deletions

BIN
lib/.DS_Store vendored

Binary file not shown.

View file

@ -291,7 +291,7 @@ class _GameScreenState extends State<GameScreen> with TickerProviderStateMixin {
String? bgImage;
if (themeType == AppThemeType.wood) bgImage = 'assets/images/wood_bg.jpg';
if (themeType == AppThemeType.doodle) bgImage = 'assets/images/doodle_bg.jpg';
if (themeType == AppThemeType.doodle) bgImage = 'assets/images/doodle_bg.jpg'; // Questo è lo sfondo carta
if (themeType == AppThemeType.cyberpunk) bgImage = 'assets/images/cyber_bg.jpg';
if (themeType == AppThemeType.music) bgImage = 'assets/images/music_bg.jpg';
@ -342,7 +342,6 @@ class _GameScreenState extends State<GameScreen> with TickerProviderStateMixin {
child: Stack(
children: [
// --- IL VERO SFONDO SFOCATO SAGOMATO ---
// Ritaglia il filtro di sfocatura esattamente sulla forma dell'arena
if (themeType == AppThemeType.music)
Positioned.fill(
child: ClipPath(
@ -350,7 +349,7 @@ class _GameScreenState extends State<GameScreen> with TickerProviderStateMixin {
child: BackdropFilter(
filter: ImageFilter.blur(sigmaX: 8.0, sigmaY: 8.0),
child: Container(
color: Colors.white.withOpacity(0.08), // La patina chiara
color: Colors.white.withOpacity(0.08),
),
),
),
@ -430,33 +429,55 @@ class _GameScreenState extends State<GameScreen> with TickerProviderStateMixin {
canPop: true,
onPopInvoked: (didPop) { gameController.disconnectOnlineGame(); },
child: Scaffold(
backgroundColor: bgImage != null ? Colors.transparent : theme.background,
body: Container(
decoration: bgImage != null ? BoxDecoration(image: DecorationImage(image: AssetImage(bgImage), fit: BoxFit.cover, colorFilter: themeType == AppThemeType.doodle ? ColorFilter.mode(Colors.white.withOpacity(0.7), BlendMode.lighten) : null)) : null,
child: CustomPaint(
painter: themeType == AppThemeType.doodle ? FullScreenGridPainter(Colors.black.withOpacity(0.06)) : null,
child: Stack(
backgroundColor: Colors.transparent, // Assicuriamo che la scaffold base sia trasparente
body: Stack(
children: [
// 1. Sfondo base a tinta unita (In caso non ci sia l'immagine)
Container(color: themeType == AppThemeType.doodle ? Colors.white : theme.background),
// 2. Immagine di Sfondo per tutti i temi che la supportano
if (bgImage != null)
Positioned.fill(
child: Image.asset(
bgImage,
fit: BoxFit.cover,
alignment: Alignment.center,
),
),
// 3. Griglia a righe incrociate per il doodle (Sopra l'immagine di carta)
if (themeType == AppThemeType.doodle)
Positioned.fill(
child: CustomPaint(
painter: FullScreenGridPainter(Colors.blue.withOpacity(0.15)),
),
),
// 4. Patina scura (Cyberpunk e Music) per far risaltare il neon
if (bgImage != null && (themeType == AppThemeType.cyberpunk || themeType == AppThemeType.music))
Positioned.fill(
child: Container(
decoration: BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter, end: Alignment.bottomCenter,
colors: [Colors.black.withOpacity(0.3), Colors.black.withOpacity(0.8)]
colors: [Colors.black.withOpacity(0.4), Colors.black.withOpacity(0.8)]
)
),
),
),
// 5. Effetto "Furia" o Timeout
if (gameController.isTimeMode && !gameController.isCPUThinking && !gameController.isGameOver && gameController.timeLeft > 0 && gameController.timeLeft <= 5 && !gameController.isSetupPhase)
Positioned.fill(child: BlitzBackgroundEffect(timeLeft: gameController.timeLeft, color: theme.playerRed, themeType: themeType)),
// 6. Testo degli Eventi
if (gameController.effectText.isNotEmpty)
Positioned.fill(child: SpecialEventBackgroundEffect(text: gameController.effectText, color: gameController.effectColor, themeType: themeType)),
// 7. Il Gioco Vero e Proprio
Positioned.fill(child: gameContent),
// 8. Schermata Passaggio Dispositivo
if (gameController.isSetupPhase && !_hideJokerMessage)
Positioned.fill(
child: Container(
@ -475,13 +496,12 @@ class _GameScreenState extends State<GameScreen> with TickerProviderStateMixin {
),
),
// 9. Effetti di Vittoria
if (gameController.isGameOver && gameController.board.scoreRed != gameController.board.scoreBlue)
Positioned.fill(child: IgnorePointer(child: WinnerVFXOverlay(winnerColor: gameController.board.scoreRed > gameController.board.scoreBlue ? theme.playerRed : theme.playerBlue, themeType: themeType))),
],
),
),
),
),
);
}
@ -530,7 +550,6 @@ class _ArenaClipper extends CustomClipper<Path> {
Path path = Path();
for (var box in board.boxes) {
// Ignora i buchi in modo che non vengano sfocati!
if (box.type != BoxType.invisible) {
path.addRect(Rect.fromLTWH(
box.x * spacing + offset,