Auto-sync: 20260314_180000
This commit is contained in:
parent
e1861031a8
commit
bbcd80a6a9
2 changed files with 69 additions and 50 deletions
BIN
lib/.DS_Store
vendored
BIN
lib/.DS_Store
vendored
Binary file not shown.
|
|
@ -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,56 +429,77 @@ 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(
|
||||
children: [
|
||||
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)]
|
||||
)
|
||||
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.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(
|
||||
color: themeType == AppThemeType.cyberpunk || themeType == AppThemeType.arcade || themeType == AppThemeType.music
|
||||
? Colors.black.withOpacity(0.98)
|
||||
: theme.background.withOpacity(0.98),
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30.0),
|
||||
child: GestureDetector(
|
||||
onTap: () { setState(() { _hideJokerMessage = true; }); },
|
||||
child: Material(color: Colors.transparent, child: _buildThemedJokerMessage(theme, themeType, gameController)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
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)),
|
||||
|
||||
if (gameController.effectText.isNotEmpty)
|
||||
Positioned.fill(child: SpecialEventBackgroundEffect(text: gameController.effectText, color: gameController.effectColor, themeType: themeType)),
|
||||
|
||||
Positioned.fill(child: gameContent),
|
||||
|
||||
if (gameController.isSetupPhase && !_hideJokerMessage)
|
||||
Positioned.fill(
|
||||
child: Container(
|
||||
color: themeType == AppThemeType.cyberpunk || themeType == AppThemeType.arcade || themeType == AppThemeType.music
|
||||
? Colors.black.withOpacity(0.98)
|
||||
: theme.background.withOpacity(0.98),
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 30.0),
|
||||
child: GestureDetector(
|
||||
onTap: () { setState(() { _hideJokerMessage = true; }); },
|
||||
child: Material(color: Colors.transparent, child: _buildThemedJokerMessage(theme, themeType, gameController)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
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))),
|
||||
],
|
||||
),
|
||||
),
|
||||
// 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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue