From 0865f842a095859449ff81c86efba16cfa25f70b Mon Sep 17 00:00:00 2001 From: JiWoong Sul Date: Fri, 26 Dec 2025 17:52:22 +0900 Subject: [PATCH] =?UTF-8?q?feat(animation):=20=EB=B6=80=ED=99=9C=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=EB=A9=94=EC=8B=9C=EC=A7=80=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - TaskProgressPanel에 부활 메시지 표시 로직 추가 - EnhancedAnimationPanel에 부활 상태 메시지 표시 - _getStatusMessage 메서드로 상태별 메시지 분기 --- .../widgets/enhanced_animation_panel.dart | 15 ++++++++++++- .../game/widgets/task_progress_panel.dart | 21 ++++++++++++++++--- 2 files changed, 32 insertions(+), 4 deletions(-) diff --git a/lib/src/features/game/widgets/enhanced_animation_panel.dart b/lib/src/features/game/widgets/enhanced_animation_panel.dart index d0f1416..590678c 100644 --- a/lib/src/features/game/widgets/enhanced_animation_panel.dart +++ b/lib/src/features/game/widgets/enhanced_animation_panel.dart @@ -609,6 +609,19 @@ class _EnhancedAnimationPanelState extends State ); } + /// 현재 상태에 맞는 메시지 반환 + /// + /// 특수 애니메이션(부활 등) 중에는 해당 메시지 표시 + String _getStatusMessage() { + // 부활 애니메이션 중에는 부활 메시지 표시 + if (widget.specialAnimation == AsciiAnimationType.resurrection) { + return l10n.animationResurrecting; + } + + // 기본: 현재 태스크 캡션 + return widget.progress.currentTask.caption; + } + /// 태스크 프로그레스 바 Widget _buildTaskProgress() { final task = widget.progress.task; @@ -620,7 +633,7 @@ class _EnhancedAnimationPanelState extends State children: [ // 캡션 Text( - widget.progress.currentTask.caption, + _getStatusMessage(), style: Theme.of(context).textTheme.bodySmall, textAlign: TextAlign.center, maxLines: 1, diff --git a/lib/src/features/game/widgets/task_progress_panel.dart b/lib/src/features/game/widgets/task_progress_panel.dart index cb564a6..64e6efc 100644 --- a/lib/src/features/game/widgets/task_progress_panel.dart +++ b/lib/src/features/game/widgets/task_progress_panel.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; +import 'package:askiineverdie/data/game_text_l10n.dart' as game_l10n; import 'package:askiineverdie/l10n/app_localizations.dart'; import 'package:askiineverdie/src/core/animation/ascii_animation_type.dart'; import 'package:askiineverdie/src/core/model/combat_event.dart'; @@ -87,9 +88,7 @@ class TaskProgressPanel extends StatelessWidget { const SizedBox(width: 8), Expanded( child: Text( - progress.currentTask.caption.isNotEmpty - ? progress.currentTask.caption - : L10n.of(context).welcomeMessage, + _getStatusMessage(context), style: Theme.of(context).textTheme.bodyMedium, textAlign: TextAlign.center, ), @@ -154,6 +153,22 @@ class TaskProgressPanel extends StatelessWidget { ); } + /// 현재 상태에 맞는 메시지 반환 + /// + /// 특수 애니메이션(부활 등) 중에는 해당 메시지 표시 + String _getStatusMessage(BuildContext context) { + // 부활 애니메이션 중에는 부활 메시지 표시 + if (specialAnimation == AsciiAnimationType.resurrection) { + return game_l10n.animationResurrecting; + } + + // 기본: 현재 태스크 캡션 또는 환영 메시지 + if (progress.currentTask.caption.isNotEmpty) { + return progress.currentTask.caption; + } + return L10n.of(context).welcomeMessage; + } + Widget _buildProgressBar(BuildContext context) { final progressValue = progress.task.max > 0 ? (progress.task.position / progress.task.max).clamp(0.0, 1.0)