fix(ui): 게임 위젯들 레이아웃 및 스타일 수정

- death_overlay: 레이아웃 개선
- help_dialog, statistics_dialog: 스타일 통일
- notification_overlay: 간소화
- carousel_nav_bar: 스타일 업데이트
- mobile_carousel_layout: 레이아웃 조정
This commit is contained in:
JiWoong Sul
2025-12-30 23:57:11 +09:00
parent 94aad1f0fe
commit e64aac04fb
6 changed files with 209 additions and 183 deletions

View File

@@ -119,18 +119,23 @@ class _NotificationCard extends StatelessWidget {
@override
Widget build(BuildContext context) {
final (accentColor, icon, asciiIcon) = _getStyleForType(notification.type);
final (accentColor, icon, asciiIcon) = _getStyleForType(context, notification.type);
final panelBg = RetroColors.panelBgOf(context);
final borderColor = RetroColors.borderOf(context);
final surface = RetroColors.surfaceOf(context);
final textPrimary = RetroColors.textPrimaryOf(context);
final textMuted = RetroColors.textMutedOf(context);
return GestureDetector(
onTap: onDismiss,
child: Container(
decoration: BoxDecoration(
color: RetroColors.panelBg,
color: panelBg,
border: Border(
top: BorderSide(color: accentColor, width: 3),
left: BorderSide(color: accentColor, width: 3),
bottom: const BorderSide(color: RetroColors.panelBorderOuter, width: 3),
right: const BorderSide(color: RetroColors.panelBorderOuter, width: 3),
bottom: BorderSide(color: borderColor, width: 3),
right: BorderSide(color: borderColor, width: 3),
),
boxShadow: [
BoxShadow(
@@ -176,12 +181,12 @@ class _NotificationCard extends StatelessWidget {
// 닫기 버튼
GestureDetector(
onTap: onDismiss,
child: const Text(
child: Text(
'[X]',
style: TextStyle(
fontFamily: 'PressStart2P',
fontSize: 7,
color: RetroColors.textDisabled,
color: textMuted,
),
),
),
@@ -198,7 +203,7 @@ class _NotificationCard extends StatelessWidget {
width: 36,
height: 36,
decoration: BoxDecoration(
color: RetroColors.panelBgLight,
color: surface,
border: Border.all(color: accentColor, width: 2),
),
child: Icon(icon, color: accentColor, size: 20),
@@ -212,20 +217,20 @@ class _NotificationCard extends StatelessWidget {
children: [
Text(
notification.title,
style: const TextStyle(
style: TextStyle(
fontFamily: 'PressStart2P',
fontSize: 9,
color: RetroColors.textLight,
color: textPrimary,
),
),
if (notification.subtitle != null) ...[
const SizedBox(height: 4),
Text(
notification.subtitle!,
style: const TextStyle(
style: TextStyle(
fontFamily: 'PressStart2P',
fontSize: 7,
color: RetroColors.textDisabled,
color: textMuted,
),
),
],
@@ -242,53 +247,25 @@ class _NotificationCard extends StatelessWidget {
}
/// 알림 타입별 레트로 스타일 (강조 색상, 아이콘, ASCII 아이콘)
(Color, IconData, String) _getStyleForType(NotificationType type) {
(Color, IconData, String) _getStyleForType(
BuildContext context,
NotificationType type,
) {
final gold = RetroColors.goldOf(context);
final exp = RetroColors.expOf(context);
final mp = RetroColors.mpOf(context);
final hp = RetroColors.hpOf(context);
return switch (type) {
NotificationType.levelUp => (
RetroColors.gold,
Icons.arrow_upward,
'',
),
NotificationType.questComplete => (
RetroColors.expGreen,
Icons.check,
'',
),
NotificationType.actComplete => (
RetroColors.mpBlue,
Icons.flag,
'',
),
NotificationType.newSpell => (
const Color(0xFF9966FF),
Icons.auto_fix_high,
'',
),
NotificationType.newEquipment => (
const Color(0xFFFF9933),
Icons.shield,
'',
),
NotificationType.bossDefeat => (
RetroColors.hpRed,
Icons.whatshot,
'',
),
NotificationType.gameSaved => (
RetroColors.expGreen,
Icons.save,
'💾',
),
NotificationType.info => (
RetroColors.mpBlue,
Icons.info_outline,
'',
),
NotificationType.warning => (
const Color(0xFFFFCC00),
Icons.warning,
'',
),
NotificationType.levelUp => (gold, Icons.arrow_upward, ''),
NotificationType.questComplete => (exp, Icons.check, ''),
NotificationType.actComplete => (mp, Icons.flag, ''),
NotificationType.newSpell => (const Color(0xFF9966FF), Icons.auto_fix_high, ''),
NotificationType.newEquipment => (const Color(0xFFFF9933), Icons.shield, ''),
NotificationType.bossDefeat => (hp, Icons.whatshot, ''),
NotificationType.gameSaved => (exp, Icons.save, '💾'),
NotificationType.info => (mp, Icons.info_outline, ''),
NotificationType.warning => (const Color(0xFFFFCC00), Icons.warning, ''),
};
}