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

@@ -355,11 +355,14 @@ class _MobileCarouselLayoutState extends State<MobileCarouselLayout> {
/// 옵션 메뉴 표시 /// 옵션 메뉴 표시
void _showOptionsMenu(BuildContext context) { void _showOptionsMenu(BuildContext context) {
final localizations = L10n.of(context); final localizations = L10n.of(context);
final panelBg = RetroColors.panelBgOf(context);
final gold = RetroColors.goldOf(context);
final surface = RetroColors.surfaceOf(context);
showModalBottomSheet<void>( showModalBottomSheet<void>(
context: context, context: context,
isScrollControlled: true, isScrollControlled: true,
backgroundColor: RetroColors.panelBg, backgroundColor: panelBg,
constraints: BoxConstraints( constraints: BoxConstraints(
maxHeight: MediaQuery.of(context).size.height * 0.7, maxHeight: MediaQuery.of(context).size.height * 0.7,
), ),
@@ -372,18 +375,18 @@ class _MobileCarouselLayoutState extends State<MobileCarouselLayout> {
Container( Container(
padding: const EdgeInsets.all(16), padding: const EdgeInsets.all(16),
width: double.infinity, width: double.infinity,
decoration: const BoxDecoration( decoration: BoxDecoration(
color: RetroColors.darkBrown, color: surface,
border: Border( border: Border(
bottom: BorderSide(color: RetroColors.gold, width: 2), bottom: BorderSide(color: gold, width: 2),
), ),
), ),
child: const Text( child: Text(
'OPTIONS', 'OPTIONS',
style: TextStyle( style: TextStyle(
fontFamily: 'PressStart2P', fontFamily: 'PressStart2P',
fontSize: 12, fontSize: 12,
color: RetroColors.gold, color: gold,
), ),
), ),
), ),
@@ -558,23 +561,26 @@ class _MobileCarouselLayoutState extends State<MobileCarouselLayout> {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final state = widget.state; final state = widget.state;
final background = RetroColors.backgroundOf(context);
final panelBg = RetroColors.panelBgOf(context);
final gold = RetroColors.goldOf(context);
return Scaffold( return Scaffold(
backgroundColor: RetroColors.deepBrown, backgroundColor: background,
appBar: AppBar( appBar: AppBar(
backgroundColor: RetroColors.darkBrown, backgroundColor: panelBg,
title: Text( title: Text(
L10n.of(context).progressQuestTitle(state.traits.name), L10n.of(context).progressQuestTitle(state.traits.name),
style: const TextStyle( style: TextStyle(
fontFamily: 'PressStart2P', fontFamily: 'PressStart2P',
fontSize: 10, fontSize: 10,
color: RetroColors.gold, color: gold,
), ),
), ),
actions: [ actions: [
// 옵션 버튼 // 옵션 버튼
IconButton( IconButton(
icon: const Icon(Icons.settings, color: RetroColors.gold), icon: Icon(Icons.settings, color: gold),
onPressed: () => _showOptionsMenu(context), onPressed: () => _showOptionsMenu(context),
tooltip: l10n.menuOptions, tooltip: l10n.menuOptions,
), ),

View File

@@ -30,26 +30,38 @@ class CarouselNavBar extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// 하단 SafeArea 패딩 (Android 제스처 네비게이션 영역)
final bottomPadding = MediaQuery.of(context).padding.bottom;
final panelBg = RetroColors.panelBgOf(context);
final accent = RetroColors.goldOf(context);
return Container( return Container(
height: 56, padding: EdgeInsets.only(
padding: const EdgeInsets.symmetric(horizontal: 2, vertical: 4), left: 2,
decoration: const BoxDecoration( right: 2,
color: RetroColors.darkBrown, top: 4,
bottom: 4 + bottomPadding,
),
decoration: BoxDecoration(
color: panelBg,
border: Border( border: Border(
top: BorderSide(color: RetroColors.gold, width: 2), top: BorderSide(color: accent, width: 2),
), ),
), ),
child: Row( child: SizedBox(
children: CarouselPage.values.map((page) { height: 48,
final isSelected = page.index == currentPage; child: Row(
return Expanded( children: CarouselPage.values.map((page) {
child: _NavButton( final isSelected = page.index == currentPage;
page: page, return Expanded(
isSelected: isSelected, child: _NavButton(
onTap: () => onPageSelected(page.index), page: page,
), isSelected: isSelected,
); onTap: () => onPageSelected(page.index),
}).toList(), ),
);
}).toList(),
),
), ),
); );
} }
@@ -70,10 +82,12 @@ class _NavButton extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final (icon, label) = _getIconAndLabel(page); final (icon, label) = _getIconAndLabel(page);
final color = isSelected ? RetroColors.gold : RetroColors.textDisabled; final accent = RetroColors.goldOf(context);
final bgColor = isSelected final muted = RetroColors.textMutedOf(context);
? RetroColors.panelBgLight final surface = RetroColors.surfaceOf(context);
: Colors.transparent;
final color = isSelected ? accent : muted;
final bgColor = isSelected ? surface : Colors.transparent;
return GestureDetector( return GestureDetector(
onTap: onTap, onTap: onTap,
@@ -82,9 +96,7 @@ class _NavButton extends StatelessWidget {
padding: const EdgeInsets.symmetric(vertical: 4), padding: const EdgeInsets.symmetric(vertical: 4),
decoration: BoxDecoration( decoration: BoxDecoration(
color: bgColor, color: bgColor,
border: isSelected border: isSelected ? Border.all(color: accent, width: 1) : null,
? Border.all(color: RetroColors.gold, width: 1)
: null,
), ),
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,

View File

@@ -28,6 +28,12 @@ class DeathOverlay extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
// 테마 인식 색상 (Theme-aware colors)
final hpColor = RetroColors.hpOf(context);
final hpDark = RetroColors.hpDarkOf(context);
final panelBg = RetroColors.panelBgOf(context);
final borderColor = RetroColors.borderOf(context);
return Material( return Material(
color: Colors.black.withValues(alpha: 0.9), color: Colors.black.withValues(alpha: 0.9),
child: Center( child: Center(
@@ -35,16 +41,16 @@ class DeathOverlay extends StatelessWidget {
constraints: const BoxConstraints(maxWidth: 420), constraints: const BoxConstraints(maxWidth: 420),
margin: const EdgeInsets.all(24), margin: const EdgeInsets.all(24),
decoration: BoxDecoration( decoration: BoxDecoration(
color: RetroColors.panelBg, color: panelBg,
border: const Border( border: Border(
top: BorderSide(color: RetroColors.hpRed, width: 4), top: BorderSide(color: hpColor, width: 4),
left: BorderSide(color: RetroColors.hpRed, width: 4), left: BorderSide(color: hpColor, width: 4),
bottom: BorderSide(color: RetroColors.panelBorderOuter, width: 4), bottom: BorderSide(color: borderColor, width: 4),
right: BorderSide(color: RetroColors.panelBorderOuter, width: 4), right: BorderSide(color: borderColor, width: 4),
), ),
boxShadow: [ boxShadow: [
BoxShadow( BoxShadow(
color: RetroColors.hpRed.withValues(alpha: 0.5), color: hpColor.withValues(alpha: 0.5),
blurRadius: 30, blurRadius: 30,
spreadRadius: 5, spreadRadius: 5,
), ),
@@ -58,32 +64,32 @@ class DeathOverlay extends StatelessWidget {
width: double.infinity, width: double.infinity,
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: RetroColors.hpRed.withValues(alpha: 0.3), color: hpColor.withValues(alpha: 0.3),
border: const Border( border: Border(
bottom: BorderSide(color: RetroColors.hpRed, width: 2), bottom: BorderSide(color: hpColor, width: 2),
), ),
), ),
child: const Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
Text( Text(
'', '',
style: TextStyle(fontSize: 16, color: RetroColors.hpRed), style: TextStyle(fontSize: 16, color: hpColor),
), ),
SizedBox(width: 8), const SizedBox(width: 8),
Text( Text(
'GAME OVER', 'GAME OVER',
style: TextStyle( style: TextStyle(
fontFamily: 'PressStart2P', fontFamily: 'PressStart2P',
fontSize: 12, fontSize: 12,
color: RetroColors.hpRed, color: hpColor,
letterSpacing: 2, letterSpacing: 2,
), ),
), ),
SizedBox(width: 8), const SizedBox(width: 8),
Text( Text(
'', '',
style: TextStyle(fontSize: 16, color: RetroColors.hpRed), style: TextStyle(fontSize: 16, color: hpColor),
), ),
], ],
), ),
@@ -107,7 +113,7 @@ class DeathOverlay extends StatelessWidget {
const SizedBox(height: 20), const SizedBox(height: 20),
// 구분선 // 구분선
_buildRetroDivider(), _buildRetroDivider(hpColor, hpDark),
const SizedBox(height: 16), const SizedBox(height: 16),
// 상실 정보 // 상실 정보
@@ -116,7 +122,7 @@ class DeathOverlay extends StatelessWidget {
// 전투 로그 (있는 경우만 표시) // 전투 로그 (있는 경우만 표시)
if (deathInfo.lastCombatEvents.isNotEmpty) ...[ if (deathInfo.lastCombatEvents.isNotEmpty) ...[
const SizedBox(height: 16), const SizedBox(height: 16),
_buildRetroDivider(), _buildRetroDivider(hpColor, hpDark),
const SizedBox(height: 8), const SizedBox(height: 8),
_buildCombatLog(context), _buildCombatLog(context),
], ],
@@ -136,16 +142,16 @@ class DeathOverlay extends StatelessWidget {
} }
/// 레트로 스타일 구분선 /// 레트로 스타일 구분선
Widget _buildRetroDivider() { Widget _buildRetroDivider(Color hpColor, Color hpDark) {
return Container( return Container(
height: 2, height: 2,
decoration: const BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
colors: [ colors: [
Colors.transparent, Colors.transparent,
RetroColors.hpRedDark, hpDark,
RetroColors.hpRed, hpColor,
RetroColors.hpRedDark, hpDark,
Colors.transparent, Colors.transparent,
], ],
), ),
@@ -154,10 +160,13 @@ class DeathOverlay extends StatelessWidget {
} }
Widget _buildDeathTitle(BuildContext context) { Widget _buildDeathTitle(BuildContext context) {
final hpColor = RetroColors.hpOf(context);
final hpDark = RetroColors.hpDarkOf(context);
return Column( return Column(
children: [ children: [
// ASCII 스컬 (더 큰 버전) // ASCII 스컬 (더 큰 버전)
const Text( Text(
' _____ \n' ' _____ \n'
' / \\\n' ' / \\\n'
' | () () |\n' ' | () () |\n'
@@ -166,7 +175,7 @@ class DeathOverlay extends StatelessWidget {
style: TextStyle( style: TextStyle(
fontFamily: 'JetBrainsMono', fontFamily: 'JetBrainsMono',
fontSize: 12, fontSize: 12,
color: RetroColors.hpRed, color: hpColor,
height: 1.0, height: 1.0,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
@@ -174,14 +183,14 @@ class DeathOverlay extends StatelessWidget {
const SizedBox(height: 12), const SizedBox(height: 12),
Text( Text(
l10n.deathYouDied.toUpperCase(), l10n.deathYouDied.toUpperCase(),
style: const TextStyle( style: TextStyle(
fontFamily: 'PressStart2P', fontFamily: 'PressStart2P',
fontSize: 14, fontSize: 14,
color: RetroColors.hpRed, color: hpColor,
letterSpacing: 2, letterSpacing: 2,
shadows: [ shadows: [
Shadow(color: Colors.black, blurRadius: 4), const Shadow(color: Colors.black, blurRadius: 4),
Shadow(color: RetroColors.hpRedDark, blurRadius: 8), Shadow(color: hpDark, blurRadius: 8),
], ],
), ),
), ),
@@ -190,29 +199,34 @@ class DeathOverlay extends StatelessWidget {
} }
Widget _buildCharacterInfo(BuildContext context) { Widget _buildCharacterInfo(BuildContext context) {
final surface = RetroColors.surfaceOf(context);
final borderLight = RetroColors.borderLightOf(context);
final gold = RetroColors.goldOf(context);
final textPrimary = RetroColors.textPrimaryOf(context);
return Container( return Container(
padding: const EdgeInsets.all(12), padding: const EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: RetroColors.panelBgLight.withValues(alpha: 0.5), color: surface.withValues(alpha: 0.5),
border: Border.all(color: RetroColors.panelBorderInner, width: 1), border: Border.all(color: borderLight, width: 1),
), ),
child: Column( child: Column(
children: [ children: [
Text( Text(
traits.name, traits.name,
style: const TextStyle( style: TextStyle(
fontFamily: 'PressStart2P', fontFamily: 'PressStart2P',
fontSize: 11, fontSize: 11,
color: RetroColors.gold, color: gold,
), ),
), ),
const SizedBox(height: 6), const SizedBox(height: 6),
Text( Text(
'Lv.${deathInfo.levelAtDeath} ${GameDataL10n.getKlassName(context, traits.klass)}', 'Lv.${deathInfo.levelAtDeath} ${GameDataL10n.getKlassName(context, traits.klass)}',
style: const TextStyle( style: TextStyle(
fontFamily: 'PressStart2P', fontFamily: 'PressStart2P',
fontSize: 8, fontSize: 8,
color: RetroColors.textLight, color: textPrimary,
), ),
), ),
], ],
@@ -222,28 +236,30 @@ class DeathOverlay extends StatelessWidget {
Widget _buildDeathCause(BuildContext context) { Widget _buildDeathCause(BuildContext context) {
final causeText = _getDeathCauseText(); final causeText = _getDeathCauseText();
final hpColor = RetroColors.hpOf(context);
final hpDark = RetroColors.hpDarkOf(context);
return Container( return Container(
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8), padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
decoration: BoxDecoration( decoration: BoxDecoration(
color: RetroColors.hpRedDark.withValues(alpha: 0.3), color: hpDark.withValues(alpha: 0.3),
border: Border.all(color: RetroColors.hpRed.withValues(alpha: 0.5)), border: Border.all(color: hpColor.withValues(alpha: 0.5)),
), ),
child: Row( child: Row(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
const Text( Text(
'', '',
style: TextStyle(fontSize: 14, color: RetroColors.hpRed), style: TextStyle(fontSize: 14, color: hpColor),
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Flexible( Flexible(
child: Text( child: Text(
causeText, causeText,
style: const TextStyle( style: TextStyle(
fontFamily: 'PressStart2P', fontFamily: 'PressStart2P',
fontSize: 7, fontSize: 7,
color: RetroColors.hpRed, color: hpColor,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
), ),
@@ -263,6 +279,11 @@ class DeathOverlay extends StatelessWidget {
Widget _buildLossInfo(BuildContext context) { Widget _buildLossInfo(BuildContext context) {
final hasLostItem = deathInfo.lostItemName != null; final hasLostItem = deathInfo.lostItemName != null;
final hpColor = RetroColors.hpOf(context);
final hpDark = RetroColors.hpDarkOf(context);
final muted = RetroColors.textMutedOf(context);
final expColor = RetroColors.expOf(context);
final gold = RetroColors.goldOf(context);
return Column( return Column(
children: [ children: [
@@ -271,9 +292,9 @@ class DeathOverlay extends StatelessWidget {
Container( Container(
padding: const EdgeInsets.all(10), padding: const EdgeInsets.all(10),
decoration: BoxDecoration( decoration: BoxDecoration(
color: RetroColors.hpRedDark.withValues(alpha: 0.2), color: hpDark.withValues(alpha: 0.2),
border: Border.all( border: Border.all(
color: RetroColors.hpRed.withValues(alpha: 0.4), color: hpColor.withValues(alpha: 0.4),
), ),
), ),
child: Row( child: Row(
@@ -289,19 +310,19 @@ class DeathOverlay extends StatelessWidget {
children: [ children: [
Text( Text(
l10n.deathSacrificedToResurrect.toUpperCase(), l10n.deathSacrificedToResurrect.toUpperCase(),
style: const TextStyle( style: TextStyle(
fontFamily: 'PressStart2P', fontFamily: 'PressStart2P',
fontSize: 6, fontSize: 6,
color: RetroColors.textDisabled, color: muted,
), ),
), ),
const SizedBox(height: 4), const SizedBox(height: 4),
Text( Text(
deathInfo.lostItemName!, deathInfo.lostItemName!,
style: const TextStyle( style: TextStyle(
fontFamily: 'PressStart2P', fontFamily: 'PressStart2P',
fontSize: 7, fontSize: 7,
color: RetroColors.hpRed, color: hpColor,
), ),
), ),
], ],
@@ -317,7 +338,7 @@ class DeathOverlay extends StatelessWidget {
asciiIcon: '', asciiIcon: '',
label: l10n.deathEquipment, label: l10n.deathEquipment,
value: l10n.deathNoSacrificeNeeded, value: l10n.deathNoSacrificeNeeded,
valueColor: RetroColors.expGreen, valueColor: expColor,
), ),
const SizedBox(height: 8), const SizedBox(height: 8),
], ],
@@ -326,7 +347,7 @@ class DeathOverlay extends StatelessWidget {
asciiIcon: '💰', asciiIcon: '💰',
label: l10n.deathCoinRemaining, label: l10n.deathCoinRemaining,
value: _formatGold(deathInfo.goldAtDeath), value: _formatGold(deathInfo.goldAtDeath),
valueColor: RetroColors.gold, valueColor: gold,
), ),
], ],
); );
@@ -339,6 +360,8 @@ class DeathOverlay extends StatelessWidget {
required String value, required String value,
required Color valueColor, required Color valueColor,
}) { }) {
final muted = RetroColors.textMutedOf(context);
return Row( return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [ children: [
@@ -351,10 +374,10 @@ class DeathOverlay extends StatelessWidget {
const SizedBox(width: 8), const SizedBox(width: 8),
Text( Text(
label, label,
style: const TextStyle( style: TextStyle(
fontFamily: 'PressStart2P', fontFamily: 'PressStart2P',
fontSize: 6, fontSize: 6,
color: RetroColors.textDisabled, color: muted,
), ),
), ),
], ],
@@ -381,22 +404,25 @@ class DeathOverlay extends StatelessWidget {
} }
Widget _buildResurrectButton(BuildContext context) { Widget _buildResurrectButton(BuildContext context) {
final expColor = RetroColors.expOf(context);
final expDark = RetroColors.expDarkOf(context);
return GestureDetector( return GestureDetector(
onTap: onResurrect, onTap: onResurrect,
child: Container( child: Container(
width: double.infinity, width: double.infinity,
padding: const EdgeInsets.symmetric(vertical: 12), padding: const EdgeInsets.symmetric(vertical: 12),
decoration: BoxDecoration( decoration: BoxDecoration(
color: RetroColors.expGreen.withValues(alpha: 0.2), color: expColor.withValues(alpha: 0.2),
border: Border( border: Border(
top: const BorderSide(color: RetroColors.expGreen, width: 3), top: BorderSide(color: expColor, width: 3),
left: const BorderSide(color: RetroColors.expGreen, width: 3), left: BorderSide(color: expColor, width: 3),
bottom: BorderSide( bottom: BorderSide(
color: RetroColors.expGreenDark.withValues(alpha: 0.8), color: expDark.withValues(alpha: 0.8),
width: 3, width: 3,
), ),
right: BorderSide( right: BorderSide(
color: RetroColors.expGreenDark.withValues(alpha: 0.8), color: expDark.withValues(alpha: 0.8),
width: 3, width: 3,
), ),
), ),
@@ -404,21 +430,21 @@ class DeathOverlay extends StatelessWidget {
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
const Text( Text(
'', '',
style: TextStyle( style: TextStyle(
fontSize: 16, fontSize: 16,
color: RetroColors.expGreen, color: expColor,
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
), ),
), ),
const SizedBox(width: 8), const SizedBox(width: 8),
Text( Text(
l10n.deathResurrect.toUpperCase(), l10n.deathResurrect.toUpperCase(),
style: const TextStyle( style: TextStyle(
fontFamily: 'PressStart2P', fontFamily: 'PressStart2P',
fontSize: 10, fontSize: 10,
color: RetroColors.expGreen, color: expColor,
letterSpacing: 1, letterSpacing: 1,
), ),
), ),
@@ -431,6 +457,9 @@ class DeathOverlay extends StatelessWidget {
/// 사망 직전 전투 로그 표시 /// 사망 직전 전투 로그 표시
Widget _buildCombatLog(BuildContext context) { Widget _buildCombatLog(BuildContext context) {
final events = deathInfo.lastCombatEvents; final events = deathInfo.lastCombatEvents;
final gold = RetroColors.goldOf(context);
final background = RetroColors.backgroundOf(context);
final borderColor = RetroColors.borderOf(context);
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
@@ -444,10 +473,10 @@ class DeathOverlay extends StatelessWidget {
const SizedBox(width: 6), const SizedBox(width: 6),
Text( Text(
l10n.deathCombatLog.toUpperCase(), l10n.deathCombatLog.toUpperCase(),
style: const TextStyle( style: TextStyle(
fontFamily: 'PressStart2P', fontFamily: 'PressStart2P',
fontSize: 7, fontSize: 7,
color: RetroColors.gold, color: gold,
), ),
), ),
], ],
@@ -456,8 +485,8 @@ class DeathOverlay extends StatelessWidget {
Container( Container(
constraints: const BoxConstraints(maxHeight: 100), constraints: const BoxConstraints(maxHeight: 100),
decoration: BoxDecoration( decoration: BoxDecoration(
color: RetroColors.deepBrown, color: background,
border: Border.all(color: RetroColors.panelBorderOuter, width: 2), border: Border.all(color: borderColor, width: 2),
), ),
child: ListView.builder( child: ListView.builder(
shrinkWrap: true, shrinkWrap: true,
@@ -475,7 +504,7 @@ class DeathOverlay extends StatelessWidget {
/// 개별 전투 이벤트 타일 /// 개별 전투 이벤트 타일
Widget _buildCombatEventTile(BuildContext context, CombatEvent event) { Widget _buildCombatEventTile(BuildContext context, CombatEvent event) {
final (asciiIcon, color, message) = _formatCombatEvent(event); final (asciiIcon, color, message) = _formatCombatEvent(context, event);
return Padding( return Padding(
padding: const EdgeInsets.symmetric(vertical: 1), padding: const EdgeInsets.symmetric(vertical: 1),
@@ -503,19 +532,27 @@ class DeathOverlay extends StatelessWidget {
} }
/// 전투 이벤트를 ASCII 아이콘, 색상, 메시지로 포맷 /// 전투 이벤트를 ASCII 아이콘, 색상, 메시지로 포맷
(String, Color, String) _formatCombatEvent(CombatEvent event) { (String, Color, String) _formatCombatEvent(
BuildContext context,
CombatEvent event,
) {
final target = event.targetName ?? ''; final target = event.targetName ?? '';
final gold = RetroColors.goldOf(context);
final exp = RetroColors.expOf(context);
final hp = RetroColors.hpOf(context);
final mp = RetroColors.mpOf(context);
return switch (event.type) { return switch (event.type) {
CombatEventType.playerAttack => ( CombatEventType.playerAttack => (
event.isCritical ? '' : '', event.isCritical ? '' : '',
event.isCritical ? RetroColors.gold : RetroColors.expGreen, event.isCritical ? gold : exp,
event.isCritical event.isCritical
? l10n.combatCritical(event.damage, target) ? l10n.combatCritical(event.damage, target)
: l10n.combatYouHit(target, event.damage), : l10n.combatYouHit(target, event.damage),
), ),
CombatEventType.monsterAttack => ( CombatEventType.monsterAttack => (
'💀', '💀',
RetroColors.hpRed, hp,
l10n.combatMonsterHitsYou(target, event.damage), l10n.combatMonsterHitsYou(target, event.damage),
), ),
CombatEventType.playerEvade => ( CombatEventType.playerEvade => (
@@ -530,7 +567,7 @@ class DeathOverlay extends StatelessWidget {
), ),
CombatEventType.playerBlock => ( CombatEventType.playerBlock => (
'🛡', '🛡',
RetroColors.mpBlue, mp,
l10n.combatBlockedAttack(target, event.damage), l10n.combatBlockedAttack(target, event.damage),
), ),
CombatEventType.playerParry => ( CombatEventType.playerParry => (
@@ -545,12 +582,12 @@ class DeathOverlay extends StatelessWidget {
), ),
CombatEventType.playerHeal => ( CombatEventType.playerHeal => (
'', '',
RetroColors.expGreen, exp,
l10n.combatHealedFor(event.healAmount), l10n.combatHealedFor(event.healAmount),
), ),
CombatEventType.playerBuff => ( CombatEventType.playerBuff => (
'', '',
RetroColors.mpBlue, mp,
l10n.combatBuffActivated(event.skillName ?? ''), l10n.combatBuffActivated(event.skillName ?? ''),
), ),
CombatEventType.playerDebuff => ( CombatEventType.playerDebuff => (
@@ -565,12 +602,12 @@ class DeathOverlay extends StatelessWidget {
), ),
CombatEventType.playerPotion => ( CombatEventType.playerPotion => (
'🧪', '🧪',
RetroColors.expGreen, exp,
l10n.combatPotionUsed(event.skillName ?? '', event.healAmount, target), l10n.combatPotionUsed(event.skillName ?? '', event.healAmount, target),
), ),
CombatEventType.potionDrop => ( CombatEventType.potionDrop => (
'🎁', '🎁',
RetroColors.gold, gold,
l10n.combatPotionDrop(event.skillName ?? ''), l10n.combatPotionDrop(event.skillName ?? ''),
), ),
}; };

View File

@@ -55,17 +55,20 @@ class _HelpDialogState extends State<HelpDialog>
? ['基本', '戦闘', 'スキル', 'UI'] ? ['基本', '戦闘', 'スキル', 'UI']
: ['Basics', 'Combat', 'Skills', 'UI']; : ['Basics', 'Combat', 'Skills', 'UI'];
// 도움말은 MP 블루 색상 사용 (테마 인식)
final mpColor = RetroColors.mpOf(context);
return RetroDialog( return RetroDialog(
title: title, title: title,
titleIcon: '', titleIcon: '',
accentColor: RetroColors.mpBlue, accentColor: mpColor,
child: Column( child: Column(
children: [ children: [
// 탭 바 // 탭 바
RetroTabBar( RetroTabBar(
controller: _tabController, controller: _tabController,
tabs: tabs, tabs: tabs,
accentColor: RetroColors.mpBlue, accentColor: mpColor,
), ),
// 탭 내용 // 탭 내용
Expanded( Expanded(
@@ -465,11 +468,11 @@ class _HelpSection extends StatelessWidget {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// 섹션 헤더 // 섹션 헤더 (MP 블루 테마 인식)
RetroSectionHeader( RetroSectionHeader(
title: title, title: title,
icon: icon, icon: icon,
accentColor: RetroColors.mpBlue, accentColor: RetroColors.mpOf(context),
), ),
// 내용 // 내용
RetroInfoBox(content: content), RetroInfoBox(content: content),

View File

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

View File

@@ -1,7 +1,6 @@
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:askiineverdie/src/core/model/game_statistics.dart'; import 'package:askiineverdie/src/core/model/game_statistics.dart';
import 'package:askiineverdie/src/shared/retro_colors.dart';
import 'package:askiineverdie/src/shared/widgets/retro_dialog.dart'; import 'package:askiineverdie/src/shared/widgets/retro_dialog.dart';
/// 게임 통계 다이얼로그 (Statistics Dialog) /// 게임 통계 다이얼로그 (Statistics Dialog)
@@ -75,14 +74,14 @@ class _StatisticsDialogState extends State<StatisticsDialog>
titleIcon: '📊', titleIcon: '📊',
maxWidth: 420, maxWidth: 420,
maxHeight: 520, maxHeight: 520,
accentColor: RetroColors.gold, // accentColor: 테마에서 자동 결정 (goldOf)
child: Column( child: Column(
children: [ children: [
// 탭 바 // 탭 바
RetroTabBar( RetroTabBar(
controller: _tabController, controller: _tabController,
tabs: tabs, tabs: tabs,
accentColor: RetroColors.gold, // accentColor: 테마에서 자동 결정 (goldOf)
), ),
// 탭 내용 // 탭 내용
Expanded( Expanded(
@@ -573,12 +572,8 @@ class _StatSection extends StatelessWidget {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
// 섹션 헤더 // 섹션 헤더 (테마에서 자동 결정)
RetroSectionHeader( RetroSectionHeader(title: title, icon: icon),
title: title,
icon: icon,
accentColor: RetroColors.gold,
),
// 통계 항목들 // 통계 항목들
...items, ...items,
], ],
@@ -600,12 +595,8 @@ class _StatItem extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return RetroStatRow( // highlightColor: 테마에서 자동 결정 (goldOf)
label: label, return RetroStatRow(label: label, value: value, highlight: highlight);
value: value,
highlight: highlight,
highlightColor: RetroColors.gold,
);
} }
} }