95 lines
2.3 KiB
Dart
95 lines
2.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'managers.dart';
|
|
|
|
// --- Global Theme ---
|
|
class AppTheme {
|
|
static const Color paperBg = Color(0xFFFAF9F6);
|
|
static const Color gridLine = Color(0xFFE5E4E2);
|
|
static const Color inkPrimary = Color(0xFF2D3436);
|
|
static const Color accentRed = Color(0xFFE17055);
|
|
static const Color accentYellow = Color(0xFFF1C40F);
|
|
static const Color accentGreen = Color(0xFF27AE60);
|
|
static const Color obstacleColor = Color(0xFF636E72);
|
|
}
|
|
|
|
// --- Skin Themes ---
|
|
class SkinThemeData {
|
|
final String id;
|
|
final String name;
|
|
final int cost; // 星星价格
|
|
final Color ballColor;
|
|
final Color eyeColor;
|
|
final Color inkColor;
|
|
|
|
const SkinThemeData({
|
|
required this.id,
|
|
required this.name,
|
|
required this.cost,
|
|
required this.ballColor,
|
|
required this.eyeColor,
|
|
required this.inkColor,
|
|
});
|
|
}
|
|
|
|
class SkinManager {
|
|
static const List<SkinThemeData> skins = [
|
|
SkinThemeData(
|
|
id: 'classic',
|
|
name: 'Classic Paper',
|
|
cost: 0,
|
|
ballColor: AppTheme.accentRed,
|
|
eyeColor: Colors.white,
|
|
inkColor: AppTheme.inkPrimary,
|
|
),
|
|
SkinThemeData(
|
|
id: 'ocean',
|
|
name: 'Ocean Blue',
|
|
cost: 20,
|
|
ballColor: Color(0xFF0984E3),
|
|
eyeColor: Color(0xFFE3F2FD),
|
|
inkColor: Color(0xFF0D47A1),
|
|
),
|
|
SkinThemeData(
|
|
id: 'forest',
|
|
name: 'Forest Green',
|
|
cost: 20,
|
|
ballColor: Color(0xFF00B894),
|
|
eyeColor: Color(0xFFE8F5E9),
|
|
inkColor: Color(0xFF1B5E20),
|
|
),
|
|
SkinThemeData(
|
|
id: 'sunset',
|
|
name: 'Sunset Orange',
|
|
cost: 25,
|
|
ballColor: Color(0xFFFF7675),
|
|
eyeColor: Color(0xFFFFF3E0),
|
|
inkColor: Color(0xFFE65100),
|
|
),
|
|
SkinThemeData(
|
|
id: 'neon',
|
|
name: 'Neon Night',
|
|
cost: 30,
|
|
ballColor: Color(0xFF6C5CE7),
|
|
eyeColor: Color(0xFFF3E5F5),
|
|
inkColor: Color(0xFF00E5FF),
|
|
),
|
|
SkinThemeData(
|
|
id: 'shadow',
|
|
name: 'Shadow Black',
|
|
cost: 35,
|
|
ballColor: Color(0xFF2D3436),
|
|
eyeColor: Color(0xFFB0BEC5),
|
|
inkColor: Color(0xFF000000),
|
|
),
|
|
];
|
|
|
|
static SkinThemeData get current {
|
|
final id = LevelManager.instance.selectedSkinId;
|
|
return skins.firstWhere((s) => s.id == id, orElse: () => skins.first);
|
|
}
|
|
|
|
static SkinThemeData byId(String id) {
|
|
return skins.firstWhere((s) => s.id == id, orElse: () => skins.first);
|
|
}
|
|
}
|