fix(ui): 게임 위젯들 레이아웃 및 스타일 수정
- death_overlay: 레이아웃 개선 - help_dialog, statistics_dialog: 스타일 통일 - notification_overlay: 간소화 - carousel_nav_bar: 스타일 업데이트 - mobile_carousel_layout: 레이아웃 조정
This commit is contained in:
@@ -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 ?? ''),
|
||||
),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user