fix(ui): 게임 위젯들 레이아웃 및 스타일 수정
- death_overlay: 레이아웃 개선 - help_dialog, statistics_dialog: 스타일 통일 - notification_overlay: 간소화 - carousel_nav_bar: 스타일 업데이트 - mobile_carousel_layout: 레이아웃 조정
This commit is contained in:
@@ -355,11 +355,14 @@ class _MobileCarouselLayoutState extends State<MobileCarouselLayout> {
|
||||
/// 옵션 메뉴 표시
|
||||
void _showOptionsMenu(BuildContext context) {
|
||||
final localizations = L10n.of(context);
|
||||
final panelBg = RetroColors.panelBgOf(context);
|
||||
final gold = RetroColors.goldOf(context);
|
||||
final surface = RetroColors.surfaceOf(context);
|
||||
|
||||
showModalBottomSheet<void>(
|
||||
context: context,
|
||||
isScrollControlled: true,
|
||||
backgroundColor: RetroColors.panelBg,
|
||||
backgroundColor: panelBg,
|
||||
constraints: BoxConstraints(
|
||||
maxHeight: MediaQuery.of(context).size.height * 0.7,
|
||||
),
|
||||
@@ -372,18 +375,18 @@ class _MobileCarouselLayoutState extends State<MobileCarouselLayout> {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(16),
|
||||
width: double.infinity,
|
||||
decoration: const BoxDecoration(
|
||||
color: RetroColors.darkBrown,
|
||||
decoration: BoxDecoration(
|
||||
color: surface,
|
||||
border: Border(
|
||||
bottom: BorderSide(color: RetroColors.gold, width: 2),
|
||||
bottom: BorderSide(color: gold, width: 2),
|
||||
),
|
||||
),
|
||||
child: const Text(
|
||||
child: Text(
|
||||
'OPTIONS',
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 12,
|
||||
color: RetroColors.gold,
|
||||
color: gold,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -558,23 +561,26 @@ class _MobileCarouselLayoutState extends State<MobileCarouselLayout> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final state = widget.state;
|
||||
final background = RetroColors.backgroundOf(context);
|
||||
final panelBg = RetroColors.panelBgOf(context);
|
||||
final gold = RetroColors.goldOf(context);
|
||||
|
||||
return Scaffold(
|
||||
backgroundColor: RetroColors.deepBrown,
|
||||
backgroundColor: background,
|
||||
appBar: AppBar(
|
||||
backgroundColor: RetroColors.darkBrown,
|
||||
backgroundColor: panelBg,
|
||||
title: Text(
|
||||
L10n.of(context).progressQuestTitle(state.traits.name),
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 10,
|
||||
color: RetroColors.gold,
|
||||
color: gold,
|
||||
),
|
||||
),
|
||||
actions: [
|
||||
// 옵션 버튼
|
||||
IconButton(
|
||||
icon: const Icon(Icons.settings, color: RetroColors.gold),
|
||||
icon: Icon(Icons.settings, color: gold),
|
||||
onPressed: () => _showOptionsMenu(context),
|
||||
tooltip: l10n.menuOptions,
|
||||
),
|
||||
|
||||
@@ -30,26 +30,38 @@ class CarouselNavBar extends StatelessWidget {
|
||||
|
||||
@override
|
||||
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(
|
||||
height: 56,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 2, vertical: 4),
|
||||
decoration: const BoxDecoration(
|
||||
color: RetroColors.darkBrown,
|
||||
padding: EdgeInsets.only(
|
||||
left: 2,
|
||||
right: 2,
|
||||
top: 4,
|
||||
bottom: 4 + bottomPadding,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: panelBg,
|
||||
border: Border(
|
||||
top: BorderSide(color: RetroColors.gold, width: 2),
|
||||
top: BorderSide(color: accent, width: 2),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
children: CarouselPage.values.map((page) {
|
||||
final isSelected = page.index == currentPage;
|
||||
return Expanded(
|
||||
child: _NavButton(
|
||||
page: page,
|
||||
isSelected: isSelected,
|
||||
onTap: () => onPageSelected(page.index),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
child: SizedBox(
|
||||
height: 48,
|
||||
child: Row(
|
||||
children: CarouselPage.values.map((page) {
|
||||
final isSelected = page.index == currentPage;
|
||||
return Expanded(
|
||||
child: _NavButton(
|
||||
page: page,
|
||||
isSelected: isSelected,
|
||||
onTap: () => onPageSelected(page.index),
|
||||
),
|
||||
);
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
@@ -70,10 +82,12 @@ class _NavButton extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final (icon, label) = _getIconAndLabel(page);
|
||||
final color = isSelected ? RetroColors.gold : RetroColors.textDisabled;
|
||||
final bgColor = isSelected
|
||||
? RetroColors.panelBgLight
|
||||
: Colors.transparent;
|
||||
final accent = RetroColors.goldOf(context);
|
||||
final muted = RetroColors.textMutedOf(context);
|
||||
final surface = RetroColors.surfaceOf(context);
|
||||
|
||||
final color = isSelected ? accent : muted;
|
||||
final bgColor = isSelected ? surface : Colors.transparent;
|
||||
|
||||
return GestureDetector(
|
||||
onTap: onTap,
|
||||
@@ -82,9 +96,7 @@ class _NavButton extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: bgColor,
|
||||
border: isSelected
|
||||
? Border.all(color: RetroColors.gold, width: 1)
|
||||
: null,
|
||||
border: isSelected ? Border.all(color: accent, width: 1) : null,
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
|
||||
@@ -28,6 +28,12 @@ class DeathOverlay extends StatelessWidget {
|
||||
|
||||
@override
|
||||
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(
|
||||
color: Colors.black.withValues(alpha: 0.9),
|
||||
child: Center(
|
||||
@@ -35,16 +41,16 @@ class DeathOverlay extends StatelessWidget {
|
||||
constraints: const BoxConstraints(maxWidth: 420),
|
||||
margin: const EdgeInsets.all(24),
|
||||
decoration: BoxDecoration(
|
||||
color: RetroColors.panelBg,
|
||||
border: const Border(
|
||||
top: BorderSide(color: RetroColors.hpRed, width: 4),
|
||||
left: BorderSide(color: RetroColors.hpRed, width: 4),
|
||||
bottom: BorderSide(color: RetroColors.panelBorderOuter, width: 4),
|
||||
right: BorderSide(color: RetroColors.panelBorderOuter, width: 4),
|
||||
color: panelBg,
|
||||
border: Border(
|
||||
top: BorderSide(color: hpColor, width: 4),
|
||||
left: BorderSide(color: hpColor, width: 4),
|
||||
bottom: BorderSide(color: borderColor, width: 4),
|
||||
right: BorderSide(color: borderColor, width: 4),
|
||||
),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: RetroColors.hpRed.withValues(alpha: 0.5),
|
||||
color: hpColor.withValues(alpha: 0.5),
|
||||
blurRadius: 30,
|
||||
spreadRadius: 5,
|
||||
),
|
||||
@@ -58,32 +64,32 @@ class DeathOverlay extends StatelessWidget {
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: RetroColors.hpRed.withValues(alpha: 0.3),
|
||||
border: const Border(
|
||||
bottom: BorderSide(color: RetroColors.hpRed, width: 2),
|
||||
color: hpColor.withValues(alpha: 0.3),
|
||||
border: Border(
|
||||
bottom: BorderSide(color: hpColor, width: 2),
|
||||
),
|
||||
),
|
||||
child: const Row(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'☠',
|
||||
style: TextStyle(fontSize: 16, color: RetroColors.hpRed),
|
||||
style: TextStyle(fontSize: 16, color: hpColor),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'GAME OVER',
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 12,
|
||||
color: RetroColors.hpRed,
|
||||
color: hpColor,
|
||||
letterSpacing: 2,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
const SizedBox(width: 8),
|
||||
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),
|
||||
|
||||
// 구분선
|
||||
_buildRetroDivider(),
|
||||
_buildRetroDivider(hpColor, hpDark),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
// 상실 정보
|
||||
@@ -116,7 +122,7 @@ class DeathOverlay extends StatelessWidget {
|
||||
// 전투 로그 (있는 경우만 표시)
|
||||
if (deathInfo.lastCombatEvents.isNotEmpty) ...[
|
||||
const SizedBox(height: 16),
|
||||
_buildRetroDivider(),
|
||||
_buildRetroDivider(hpColor, hpDark),
|
||||
const SizedBox(height: 8),
|
||||
_buildCombatLog(context),
|
||||
],
|
||||
@@ -136,16 +142,16 @@ class DeathOverlay extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// 레트로 스타일 구분선
|
||||
Widget _buildRetroDivider() {
|
||||
Widget _buildRetroDivider(Color hpColor, Color hpDark) {
|
||||
return Container(
|
||||
height: 2,
|
||||
decoration: const BoxDecoration(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [
|
||||
Colors.transparent,
|
||||
RetroColors.hpRedDark,
|
||||
RetroColors.hpRed,
|
||||
RetroColors.hpRedDark,
|
||||
hpDark,
|
||||
hpColor,
|
||||
hpDark,
|
||||
Colors.transparent,
|
||||
],
|
||||
),
|
||||
@@ -154,10 +160,13 @@ class DeathOverlay extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildDeathTitle(BuildContext context) {
|
||||
final hpColor = RetroColors.hpOf(context);
|
||||
final hpDark = RetroColors.hpDarkOf(context);
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
// ASCII 스컬 (더 큰 버전)
|
||||
const Text(
|
||||
Text(
|
||||
' _____ \n'
|
||||
' / \\\n'
|
||||
' | () () |\n'
|
||||
@@ -166,7 +175,7 @@ class DeathOverlay extends StatelessWidget {
|
||||
style: TextStyle(
|
||||
fontFamily: 'JetBrainsMono',
|
||||
fontSize: 12,
|
||||
color: RetroColors.hpRed,
|
||||
color: hpColor,
|
||||
height: 1.0,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
@@ -174,14 +183,14 @@ class DeathOverlay extends StatelessWidget {
|
||||
const SizedBox(height: 12),
|
||||
Text(
|
||||
l10n.deathYouDied.toUpperCase(),
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 14,
|
||||
color: RetroColors.hpRed,
|
||||
color: hpColor,
|
||||
letterSpacing: 2,
|
||||
shadows: [
|
||||
Shadow(color: Colors.black, blurRadius: 4),
|
||||
Shadow(color: RetroColors.hpRedDark, blurRadius: 8),
|
||||
const Shadow(color: Colors.black, blurRadius: 4),
|
||||
Shadow(color: hpDark, blurRadius: 8),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -190,29 +199,34 @@ class DeathOverlay extends StatelessWidget {
|
||||
}
|
||||
|
||||
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(
|
||||
padding: const EdgeInsets.all(12),
|
||||
decoration: BoxDecoration(
|
||||
color: RetroColors.panelBgLight.withValues(alpha: 0.5),
|
||||
border: Border.all(color: RetroColors.panelBorderInner, width: 1),
|
||||
color: surface.withValues(alpha: 0.5),
|
||||
border: Border.all(color: borderLight, width: 1),
|
||||
),
|
||||
child: Column(
|
||||
children: [
|
||||
Text(
|
||||
traits.name,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 11,
|
||||
color: RetroColors.gold,
|
||||
color: gold,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 6),
|
||||
Text(
|
||||
'Lv.${deathInfo.levelAtDeath} ${GameDataL10n.getKlassName(context, traits.klass)}',
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 8,
|
||||
color: RetroColors.textLight,
|
||||
color: textPrimary,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -222,28 +236,30 @@ class DeathOverlay extends StatelessWidget {
|
||||
|
||||
Widget _buildDeathCause(BuildContext context) {
|
||||
final causeText = _getDeathCauseText();
|
||||
final hpColor = RetroColors.hpOf(context);
|
||||
final hpDark = RetroColors.hpDarkOf(context);
|
||||
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
decoration: BoxDecoration(
|
||||
color: RetroColors.hpRedDark.withValues(alpha: 0.3),
|
||||
border: Border.all(color: RetroColors.hpRed.withValues(alpha: 0.5)),
|
||||
color: hpDark.withValues(alpha: 0.3),
|
||||
border: Border.all(color: hpColor.withValues(alpha: 0.5)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
const Text(
|
||||
Text(
|
||||
'⚔',
|
||||
style: TextStyle(fontSize: 14, color: RetroColors.hpRed),
|
||||
style: TextStyle(fontSize: 14, color: hpColor),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Flexible(
|
||||
child: Text(
|
||||
causeText,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 7,
|
||||
color: RetroColors.hpRed,
|
||||
color: hpColor,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
@@ -263,6 +279,11 @@ class DeathOverlay extends StatelessWidget {
|
||||
|
||||
Widget _buildLossInfo(BuildContext context) {
|
||||
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(
|
||||
children: [
|
||||
@@ -271,9 +292,9 @@ class DeathOverlay extends StatelessWidget {
|
||||
Container(
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
color: RetroColors.hpRedDark.withValues(alpha: 0.2),
|
||||
color: hpDark.withValues(alpha: 0.2),
|
||||
border: Border.all(
|
||||
color: RetroColors.hpRed.withValues(alpha: 0.4),
|
||||
color: hpColor.withValues(alpha: 0.4),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
@@ -289,19 +310,19 @@ class DeathOverlay extends StatelessWidget {
|
||||
children: [
|
||||
Text(
|
||||
l10n.deathSacrificedToResurrect.toUpperCase(),
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 6,
|
||||
color: RetroColors.textDisabled,
|
||||
color: muted,
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 4),
|
||||
Text(
|
||||
deathInfo.lostItemName!,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 7,
|
||||
color: RetroColors.hpRed,
|
||||
color: hpColor,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -317,7 +338,7 @@ class DeathOverlay extends StatelessWidget {
|
||||
asciiIcon: '✓',
|
||||
label: l10n.deathEquipment,
|
||||
value: l10n.deathNoSacrificeNeeded,
|
||||
valueColor: RetroColors.expGreen,
|
||||
valueColor: expColor,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
],
|
||||
@@ -326,7 +347,7 @@ class DeathOverlay extends StatelessWidget {
|
||||
asciiIcon: '💰',
|
||||
label: l10n.deathCoinRemaining,
|
||||
value: _formatGold(deathInfo.goldAtDeath),
|
||||
valueColor: RetroColors.gold,
|
||||
valueColor: gold,
|
||||
),
|
||||
],
|
||||
);
|
||||
@@ -339,6 +360,8 @@ class DeathOverlay extends StatelessWidget {
|
||||
required String value,
|
||||
required Color valueColor,
|
||||
}) {
|
||||
final muted = RetroColors.textMutedOf(context);
|
||||
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
@@ -351,10 +374,10 @@ class DeathOverlay extends StatelessWidget {
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 6,
|
||||
color: RetroColors.textDisabled,
|
||||
color: muted,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -381,22 +404,25 @@ class DeathOverlay extends StatelessWidget {
|
||||
}
|
||||
|
||||
Widget _buildResurrectButton(BuildContext context) {
|
||||
final expColor = RetroColors.expOf(context);
|
||||
final expDark = RetroColors.expDarkOf(context);
|
||||
|
||||
return GestureDetector(
|
||||
onTap: onResurrect,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(vertical: 12),
|
||||
decoration: BoxDecoration(
|
||||
color: RetroColors.expGreen.withValues(alpha: 0.2),
|
||||
color: expColor.withValues(alpha: 0.2),
|
||||
border: Border(
|
||||
top: const BorderSide(color: RetroColors.expGreen, width: 3),
|
||||
left: const BorderSide(color: RetroColors.expGreen, width: 3),
|
||||
top: BorderSide(color: expColor, width: 3),
|
||||
left: BorderSide(color: expColor, width: 3),
|
||||
bottom: BorderSide(
|
||||
color: RetroColors.expGreenDark.withValues(alpha: 0.8),
|
||||
color: expDark.withValues(alpha: 0.8),
|
||||
width: 3,
|
||||
),
|
||||
right: BorderSide(
|
||||
color: RetroColors.expGreenDark.withValues(alpha: 0.8),
|
||||
color: expDark.withValues(alpha: 0.8),
|
||||
width: 3,
|
||||
),
|
||||
),
|
||||
@@ -404,21 +430,21 @@ class DeathOverlay extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Text(
|
||||
Text(
|
||||
'↺',
|
||||
style: TextStyle(
|
||||
fontSize: 16,
|
||||
color: RetroColors.expGreen,
|
||||
color: expColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
l10n.deathResurrect.toUpperCase(),
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 10,
|
||||
color: RetroColors.expGreen,
|
||||
color: expColor,
|
||||
letterSpacing: 1,
|
||||
),
|
||||
),
|
||||
@@ -431,6 +457,9 @@ class DeathOverlay extends StatelessWidget {
|
||||
/// 사망 직전 전투 로그 표시
|
||||
Widget _buildCombatLog(BuildContext context) {
|
||||
final events = deathInfo.lastCombatEvents;
|
||||
final gold = RetroColors.goldOf(context);
|
||||
final background = RetroColors.backgroundOf(context);
|
||||
final borderColor = RetroColors.borderOf(context);
|
||||
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -444,10 +473,10 @@ class DeathOverlay extends StatelessWidget {
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
l10n.deathCombatLog.toUpperCase(),
|
||||
style: const TextStyle(
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 7,
|
||||
color: RetroColors.gold,
|
||||
color: gold,
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -456,8 +485,8 @@ class DeathOverlay extends StatelessWidget {
|
||||
Container(
|
||||
constraints: const BoxConstraints(maxHeight: 100),
|
||||
decoration: BoxDecoration(
|
||||
color: RetroColors.deepBrown,
|
||||
border: Border.all(color: RetroColors.panelBorderOuter, width: 2),
|
||||
color: background,
|
||||
border: Border.all(color: borderColor, width: 2),
|
||||
),
|
||||
child: ListView.builder(
|
||||
shrinkWrap: true,
|
||||
@@ -475,7 +504,7 @@ class DeathOverlay extends StatelessWidget {
|
||||
|
||||
/// 개별 전투 이벤트 타일
|
||||
Widget _buildCombatEventTile(BuildContext context, CombatEvent event) {
|
||||
final (asciiIcon, color, message) = _formatCombatEvent(event);
|
||||
final (asciiIcon, color, message) = _formatCombatEvent(context, event);
|
||||
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 1),
|
||||
@@ -503,19 +532,27 @@ class DeathOverlay extends StatelessWidget {
|
||||
}
|
||||
|
||||
/// 전투 이벤트를 ASCII 아이콘, 색상, 메시지로 포맷
|
||||
(String, Color, String) _formatCombatEvent(CombatEvent event) {
|
||||
(String, Color, String) _formatCombatEvent(
|
||||
BuildContext context,
|
||||
CombatEvent event,
|
||||
) {
|
||||
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) {
|
||||
CombatEventType.playerAttack => (
|
||||
event.isCritical ? '⚡' : '⚔',
|
||||
event.isCritical ? RetroColors.gold : RetroColors.expGreen,
|
||||
event.isCritical ? gold : exp,
|
||||
event.isCritical
|
||||
? l10n.combatCritical(event.damage, target)
|
||||
: l10n.combatYouHit(target, event.damage),
|
||||
),
|
||||
CombatEventType.monsterAttack => (
|
||||
'💀',
|
||||
RetroColors.hpRed,
|
||||
hp,
|
||||
l10n.combatMonsterHitsYou(target, event.damage),
|
||||
),
|
||||
CombatEventType.playerEvade => (
|
||||
@@ -530,7 +567,7 @@ class DeathOverlay extends StatelessWidget {
|
||||
),
|
||||
CombatEventType.playerBlock => (
|
||||
'🛡',
|
||||
RetroColors.mpBlue,
|
||||
mp,
|
||||
l10n.combatBlockedAttack(target, event.damage),
|
||||
),
|
||||
CombatEventType.playerParry => (
|
||||
@@ -545,12 +582,12 @@ class DeathOverlay extends StatelessWidget {
|
||||
),
|
||||
CombatEventType.playerHeal => (
|
||||
'♥',
|
||||
RetroColors.expGreen,
|
||||
exp,
|
||||
l10n.combatHealedFor(event.healAmount),
|
||||
),
|
||||
CombatEventType.playerBuff => (
|
||||
'↑',
|
||||
RetroColors.mpBlue,
|
||||
mp,
|
||||
l10n.combatBuffActivated(event.skillName ?? ''),
|
||||
),
|
||||
CombatEventType.playerDebuff => (
|
||||
@@ -565,12 +602,12 @@ class DeathOverlay extends StatelessWidget {
|
||||
),
|
||||
CombatEventType.playerPotion => (
|
||||
'🧪',
|
||||
RetroColors.expGreen,
|
||||
exp,
|
||||
l10n.combatPotionUsed(event.skillName ?? '', event.healAmount, target),
|
||||
),
|
||||
CombatEventType.potionDrop => (
|
||||
'🎁',
|
||||
RetroColors.gold,
|
||||
gold,
|
||||
l10n.combatPotionDrop(event.skillName ?? ''),
|
||||
),
|
||||
};
|
||||
|
||||
@@ -55,17 +55,20 @@ class _HelpDialogState extends State<HelpDialog>
|
||||
? ['基本', '戦闘', 'スキル', 'UI']
|
||||
: ['Basics', 'Combat', 'Skills', 'UI'];
|
||||
|
||||
// 도움말은 MP 블루 색상 사용 (테마 인식)
|
||||
final mpColor = RetroColors.mpOf(context);
|
||||
|
||||
return RetroDialog(
|
||||
title: title,
|
||||
titleIcon: '❓',
|
||||
accentColor: RetroColors.mpBlue,
|
||||
accentColor: mpColor,
|
||||
child: Column(
|
||||
children: [
|
||||
// 탭 바
|
||||
RetroTabBar(
|
||||
controller: _tabController,
|
||||
tabs: tabs,
|
||||
accentColor: RetroColors.mpBlue,
|
||||
accentColor: mpColor,
|
||||
),
|
||||
// 탭 내용
|
||||
Expanded(
|
||||
@@ -465,11 +468,11 @@ class _HelpSection extends StatelessWidget {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// 섹션 헤더
|
||||
// 섹션 헤더 (MP 블루 테마 인식)
|
||||
RetroSectionHeader(
|
||||
title: title,
|
||||
icon: icon,
|
||||
accentColor: RetroColors.mpBlue,
|
||||
accentColor: RetroColors.mpOf(context),
|
||||
),
|
||||
// 내용
|
||||
RetroInfoBox(content: content),
|
||||
|
||||
@@ -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, '⚠'),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/material.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';
|
||||
|
||||
/// 게임 통계 다이얼로그 (Statistics Dialog)
|
||||
@@ -75,14 +74,14 @@ class _StatisticsDialogState extends State<StatisticsDialog>
|
||||
titleIcon: '📊',
|
||||
maxWidth: 420,
|
||||
maxHeight: 520,
|
||||
accentColor: RetroColors.gold,
|
||||
// accentColor: 테마에서 자동 결정 (goldOf)
|
||||
child: Column(
|
||||
children: [
|
||||
// 탭 바
|
||||
RetroTabBar(
|
||||
controller: _tabController,
|
||||
tabs: tabs,
|
||||
accentColor: RetroColors.gold,
|
||||
// accentColor: 테마에서 자동 결정 (goldOf)
|
||||
),
|
||||
// 탭 내용
|
||||
Expanded(
|
||||
@@ -573,12 +572,8 @@ class _StatSection extends StatelessWidget {
|
||||
return Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// 섹션 헤더
|
||||
RetroSectionHeader(
|
||||
title: title,
|
||||
icon: icon,
|
||||
accentColor: RetroColors.gold,
|
||||
),
|
||||
// 섹션 헤더 (테마에서 자동 결정)
|
||||
RetroSectionHeader(title: title, icon: icon),
|
||||
// 통계 항목들
|
||||
...items,
|
||||
],
|
||||
@@ -600,12 +595,8 @@ class _StatItem extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return RetroStatRow(
|
||||
label: label,
|
||||
value: value,
|
||||
highlight: highlight,
|
||||
highlightColor: RetroColors.gold,
|
||||
);
|
||||
// highlightColor: 테마에서 자동 결정 (goldOf)
|
||||
return RetroStatRow(label: label, value: value, highlight: highlight);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user