feat(animation): 부활 상태 메시지 표시 추가
- TaskProgressPanel에 부활 메시지 표시 로직 추가 - EnhancedAnimationPanel에 부활 상태 메시지 표시 - _getStatusMessage 메서드로 상태별 메시지 분기
This commit is contained in:
@@ -609,6 +609,19 @@ class _EnhancedAnimationPanelState extends State<EnhancedAnimationPanel>
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 현재 상태에 맞는 메시지 반환
|
||||||
|
///
|
||||||
|
/// 특수 애니메이션(부활 등) 중에는 해당 메시지 표시
|
||||||
|
String _getStatusMessage() {
|
||||||
|
// 부활 애니메이션 중에는 부활 메시지 표시
|
||||||
|
if (widget.specialAnimation == AsciiAnimationType.resurrection) {
|
||||||
|
return l10n.animationResurrecting;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 기본: 현재 태스크 캡션
|
||||||
|
return widget.progress.currentTask.caption;
|
||||||
|
}
|
||||||
|
|
||||||
/// 태스크 프로그레스 바
|
/// 태스크 프로그레스 바
|
||||||
Widget _buildTaskProgress() {
|
Widget _buildTaskProgress() {
|
||||||
final task = widget.progress.task;
|
final task = widget.progress.task;
|
||||||
@@ -620,7 +633,7 @@ class _EnhancedAnimationPanelState extends State<EnhancedAnimationPanel>
|
|||||||
children: [
|
children: [
|
||||||
// 캡션
|
// 캡션
|
||||||
Text(
|
Text(
|
||||||
widget.progress.currentTask.caption,
|
_getStatusMessage(),
|
||||||
style: Theme.of(context).textTheme.bodySmall,
|
style: Theme.of(context).textTheme.bodySmall,
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
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/l10n/app_localizations.dart';
|
||||||
import 'package:askiineverdie/src/core/animation/ascii_animation_type.dart';
|
import 'package:askiineverdie/src/core/animation/ascii_animation_type.dart';
|
||||||
import 'package:askiineverdie/src/core/model/combat_event.dart';
|
import 'package:askiineverdie/src/core/model/combat_event.dart';
|
||||||
@@ -87,9 +88,7 @@ class TaskProgressPanel extends StatelessWidget {
|
|||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
progress.currentTask.caption.isNotEmpty
|
_getStatusMessage(context),
|
||||||
? progress.currentTask.caption
|
|
||||||
: L10n.of(context).welcomeMessage,
|
|
||||||
style: Theme.of(context).textTheme.bodyMedium,
|
style: Theme.of(context).textTheme.bodyMedium,
|
||||||
textAlign: TextAlign.center,
|
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) {
|
Widget _buildProgressBar(BuildContext context) {
|
||||||
final progressValue = progress.task.max > 0
|
final progressValue = progress.task.max > 0
|
||||||
? (progress.task.position / progress.task.max).clamp(0.0, 1.0)
|
? (progress.task.position / progress.task.max).clamp(0.0, 1.0)
|
||||||
|
|||||||
Reference in New Issue
Block a user