refactor(game): 게임 화면 및 위젯 정리
This commit is contained in:
@@ -491,9 +491,7 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
/// VictoryOverlay 완료 후 명예의 전당 화면으로 이동
|
||||
void _handleVictoryComplete() {
|
||||
Navigator.of(context).pushReplacement(
|
||||
MaterialPageRoute<void>(
|
||||
builder: (context) => const HallOfFameScreen(),
|
||||
),
|
||||
MaterialPageRoute<void>(builder: (context) => const HallOfFameScreen()),
|
||||
);
|
||||
}
|
||||
|
||||
@@ -570,7 +568,8 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
super.didChangeAppLifecycleState(appState);
|
||||
|
||||
// 모바일 환경 확인 (iOS/Android)
|
||||
final isMobile = !kIsWeb &&
|
||||
final isMobile =
|
||||
!kIsWeb &&
|
||||
(defaultTargetPlatform == TargetPlatform.iOS ||
|
||||
defaultTargetPlatform == TargetPlatform.android);
|
||||
|
||||
@@ -815,7 +814,8 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
setState(() {});
|
||||
},
|
||||
// 특수 애니메이션 중에는 일시정지 상태로 표시하지 않음
|
||||
isPaused: !widget.controller.isRunning && _specialAnimation == null,
|
||||
isPaused:
|
||||
!widget.controller.isRunning && _specialAnimation == null,
|
||||
onPauseToggle: () async {
|
||||
await widget.controller.togglePause();
|
||||
setState(() {});
|
||||
@@ -883,7 +883,8 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
// 치트 (디버그 모드)
|
||||
cheatsEnabled: widget.controller.cheatsEnabled,
|
||||
onCheatTask: () => widget.controller.loop?.cheatCompleteTask(),
|
||||
onCheatQuest: () => widget.controller.loop?.cheatCompleteQuest(),
|
||||
onCheatQuest: () =>
|
||||
widget.controller.loop?.cheatCompleteQuest(),
|
||||
onCheatPlot: () => widget.controller.loop?.cheatCompletePlot(),
|
||||
),
|
||||
// 사망 오버레이
|
||||
@@ -952,17 +953,20 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
IconButton(
|
||||
icon: const Text('L+1'),
|
||||
tooltip: L10n.of(context).levelUp,
|
||||
onPressed: () => widget.controller.loop?.cheatCompleteTask(),
|
||||
onPressed: () =>
|
||||
widget.controller.loop?.cheatCompleteTask(),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Text('Q!'),
|
||||
tooltip: L10n.of(context).completeQuest,
|
||||
onPressed: () => widget.controller.loop?.cheatCompleteQuest(),
|
||||
onPressed: () =>
|
||||
widget.controller.loop?.cheatCompleteQuest(),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Text('P!'),
|
||||
tooltip: L10n.of(context).completePlot,
|
||||
onPressed: () => widget.controller.loop?.cheatCompletePlot(),
|
||||
onPressed: () =>
|
||||
widget.controller.loop?.cheatCompletePlot(),
|
||||
),
|
||||
],
|
||||
// 통계 버튼
|
||||
@@ -1000,7 +1004,9 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
setState(() {});
|
||||
},
|
||||
// 특수 애니메이션 중에는 일시정지 상태로 표시하지 않음
|
||||
isPaused: !widget.controller.isRunning && _specialAnimation == null,
|
||||
isPaused:
|
||||
!widget.controller.isRunning &&
|
||||
_specialAnimation == null,
|
||||
onPauseToggle: () async {
|
||||
await widget.controller.togglePause();
|
||||
setState(() {});
|
||||
@@ -1159,7 +1165,8 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
state.progress.exp.position,
|
||||
state.progress.exp.max,
|
||||
Colors.blue,
|
||||
tooltip: '${state.progress.exp.position} / ${state.progress.exp.max}',
|
||||
tooltip:
|
||||
'${state.progress.exp.position} / ${state.progress.exp.max}',
|
||||
),
|
||||
|
||||
// 스킬 (Skills - SpellBook 기반)
|
||||
@@ -1286,9 +1293,7 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 6),
|
||||
decoration: const BoxDecoration(
|
||||
color: RetroColors.darkBrown,
|
||||
border: Border(
|
||||
bottom: BorderSide(color: RetroColors.gold, width: 2),
|
||||
),
|
||||
border: Border(bottom: BorderSide(color: RetroColors.gold, width: 2)),
|
||||
),
|
||||
child: Text(
|
||||
title.toUpperCase(),
|
||||
@@ -1345,7 +1350,9 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
border: Border(
|
||||
right: index < segmentCount - 1
|
||||
? BorderSide(
|
||||
color: RetroColors.panelBorderOuter.withValues(alpha: 0.3),
|
||||
color: RetroColors.panelBorderOuter.withValues(
|
||||
alpha: 0.3,
|
||||
),
|
||||
width: 1,
|
||||
)
|
||||
: BorderSide.none,
|
||||
@@ -1478,7 +1485,11 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
padding: const EdgeInsets.symmetric(vertical: 2),
|
||||
child: Row(
|
||||
children: [
|
||||
const Icon(Icons.monetization_on, size: 10, color: RetroColors.gold),
|
||||
const Icon(
|
||||
Icons.monetization_on,
|
||||
size: 10,
|
||||
color: RetroColors.gold,
|
||||
),
|
||||
const SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: Text(
|
||||
@@ -1568,7 +1579,9 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
Icon(
|
||||
isCompleted
|
||||
? Icons.check_box
|
||||
: (isCurrent ? Icons.arrow_right : Icons.check_box_outline_blank),
|
||||
: (isCurrent
|
||||
? Icons.arrow_right
|
||||
: Icons.check_box_outline_blank),
|
||||
size: 12,
|
||||
color: isCompleted
|
||||
? RetroColors.expGreen
|
||||
@@ -1583,7 +1596,9 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
fontSize: 8,
|
||||
color: isCompleted
|
||||
? RetroColors.textDisabled
|
||||
: (isCurrent ? RetroColors.gold : RetroColors.textLight),
|
||||
: (isCurrent
|
||||
? RetroColors.gold
|
||||
: RetroColors.textLight),
|
||||
decoration: isCompleted
|
||||
? TextDecoration.lineThrough
|
||||
: TextDecoration.none,
|
||||
|
||||
@@ -223,15 +223,14 @@ class GameSessionController extends ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
Future<void> loadAndStart({
|
||||
String? fileName,
|
||||
}) async {
|
||||
Future<void> loadAndStart({String? fileName}) async {
|
||||
_status = GameSessionStatus.loading;
|
||||
_error = null;
|
||||
notifyListeners();
|
||||
|
||||
final (outcome, loaded, savedCheatsEnabled) =
|
||||
await saveManager.loadState(fileName: fileName);
|
||||
final (outcome, loaded, savedCheatsEnabled) = await saveManager.loadState(
|
||||
fileName: fileName,
|
||||
);
|
||||
if (!outcome.success || loaded == null) {
|
||||
_status = GameSessionStatus.error;
|
||||
_error = outcome.error ?? 'Unknown error';
|
||||
@@ -346,7 +345,9 @@ class GameSessionController extends ChangeNotifier {
|
||||
combatStats: combatStats,
|
||||
);
|
||||
|
||||
debugPrint('[HallOfFame] Entry created: ${entry.characterName} Lv.${entry.level}');
|
||||
debugPrint(
|
||||
'[HallOfFame] Entry created: ${entry.characterName} Lv.${entry.level}',
|
||||
);
|
||||
|
||||
final success = await _hallOfFameStorage.addEntry(entry);
|
||||
debugPrint('[HallOfFame] Storage save result: $success');
|
||||
|
||||
@@ -247,74 +247,163 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
|
||||
CombatEventType.playerAttack => (
|
||||
BattlePhase.prepare,
|
||||
event.isCritical,
|
||||
false, false, false, false, false, false, false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
// 스킬 사용 → prepare 페이즈부터 시작 + 스킬 이펙트
|
||||
CombatEventType.playerSkill => (
|
||||
BattlePhase.prepare,
|
||||
event.isCritical,
|
||||
false, false, true, false, false, false, false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
|
||||
// 몬스터 공격 → prepare 페이즈부터 시작
|
||||
CombatEventType.monsterAttack => (
|
||||
BattlePhase.prepare,
|
||||
false, false, false, false, false, false, false, false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
// 블록 → hit 페이즈 + 블록 이펙트 + 텍스트
|
||||
CombatEventType.playerBlock => (
|
||||
BattlePhase.hit,
|
||||
false, true, false, false, false, false, false, false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
// 패리 → hit 페이즈 + 패리 이펙트 + 텍스트
|
||||
CombatEventType.playerParry => (
|
||||
BattlePhase.hit,
|
||||
false, false, true, false, false, false, false, false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
|
||||
// 플레이어 회피 → recover 페이즈 + 회피 텍스트
|
||||
CombatEventType.playerEvade => (
|
||||
BattlePhase.recover,
|
||||
false, false, false, false, true, false, false, false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
// 몬스터 회피 → idle 페이즈 + 미스 텍스트
|
||||
CombatEventType.monsterEvade => (
|
||||
BattlePhase.idle,
|
||||
false, false, false, false, false, true, false, false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
|
||||
// 회복/버프 → idle 페이즈 유지
|
||||
CombatEventType.playerHeal => (
|
||||
BattlePhase.idle,
|
||||
false, false, false, false, false, false, false, false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
CombatEventType.playerBuff => (
|
||||
BattlePhase.idle,
|
||||
false, false, false, false, false, false, false, false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
|
||||
// 디버프 적용 → idle 페이즈 + 디버프 텍스트
|
||||
CombatEventType.playerDebuff => (
|
||||
BattlePhase.idle,
|
||||
false, false, false, false, false, false, true, false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
),
|
||||
|
||||
// DOT 틱 → attack 페이즈 + DOT 텍스트
|
||||
CombatEventType.dotTick => (
|
||||
BattlePhase.attack,
|
||||
false, false, false, false, false, false, false, true,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
true,
|
||||
),
|
||||
|
||||
// 물약 사용 → idle 페이즈 유지
|
||||
CombatEventType.playerPotion => (
|
||||
BattlePhase.idle,
|
||||
false, false, false, false, false, false, false, false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
|
||||
// 물약 드랍 → idle 페이즈 유지
|
||||
CombatEventType.potionDrop => (
|
||||
BattlePhase.idle,
|
||||
false, false, false, false, false, false, false, false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
false,
|
||||
),
|
||||
};
|
||||
|
||||
@@ -375,7 +464,8 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
|
||||
// 특수 애니메이션 프레임 간격 계산 (200ms tick 기준)
|
||||
// 예: resurrection 600ms → 600/200 = 3 tick마다 1 프레임
|
||||
final frameInterval =
|
||||
(specialAnimationFrameIntervals[_currentSpecialAnimation] ?? 200) ~/
|
||||
(specialAnimationFrameIntervals[_currentSpecialAnimation] ??
|
||||
200) ~/
|
||||
200;
|
||||
if (_specialTick >= frameInterval) {
|
||||
_specialTick = 0;
|
||||
@@ -576,9 +666,7 @@ class _AsciiAnimationCardState extends State<AsciiAnimationCard> {
|
||||
);
|
||||
} else if (isSpecial) {
|
||||
// 특수 애니메이션: 포지티브 색상 테두리
|
||||
borderEffect = Border.all(
|
||||
color: positiveColor.withValues(alpha: 0.5),
|
||||
);
|
||||
borderEffect = Border.all(color: positiveColor.withValues(alpha: 0.5));
|
||||
}
|
||||
|
||||
return Container(
|
||||
|
||||
@@ -44,9 +44,7 @@ class CarouselNavBar extends StatelessWidget {
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: panelBg,
|
||||
border: Border(
|
||||
top: BorderSide(color: accent, width: 2),
|
||||
),
|
||||
border: Border(top: BorderSide(color: accent, width: 2)),
|
||||
),
|
||||
child: SizedBox(
|
||||
height: 56,
|
||||
|
||||
@@ -11,6 +11,15 @@ class CombatLogEntry {
|
||||
final String message;
|
||||
final DateTime timestamp;
|
||||
final CombatLogType type;
|
||||
|
||||
/// JSON 직렬화 (배틀 로그 저장용)
|
||||
Map<String, dynamic> toJson() {
|
||||
return {
|
||||
'message': message,
|
||||
'timestamp': timestamp.toIso8601String(),
|
||||
'type': type.name,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// 로그 타입에 따른 스타일 구분
|
||||
|
||||
@@ -70,20 +70,18 @@ class DeathOverlay extends StatelessWidget {
|
||||
// 헤더 바
|
||||
Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 12,
|
||||
vertical: 8,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: hpColor.withValues(alpha: 0.3),
|
||||
border: Border(
|
||||
bottom: BorderSide(color: hpColor, width: 2),
|
||||
),
|
||||
border: Border(bottom: BorderSide(color: hpColor, width: 2)),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'☠',
|
||||
style: TextStyle(fontSize: 16, color: hpColor),
|
||||
),
|
||||
Text('☠', style: TextStyle(fontSize: 16, color: hpColor)),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'GAME OVER',
|
||||
@@ -95,10 +93,7 @@ class DeathOverlay extends StatelessWidget {
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
'☠',
|
||||
style: TextStyle(fontSize: 16, color: hpColor),
|
||||
),
|
||||
Text('☠', style: TextStyle(fontSize: 16, color: hpColor)),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -264,10 +259,7 @@ class DeathOverlay extends StatelessWidget {
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Text(
|
||||
'⚔',
|
||||
style: TextStyle(fontSize: 14, color: hpColor),
|
||||
),
|
||||
Text('⚔', style: TextStyle(fontSize: 14, color: hpColor)),
|
||||
const SizedBox(width: 8),
|
||||
Flexible(
|
||||
child: Text(
|
||||
@@ -309,16 +301,11 @@ class DeathOverlay extends StatelessWidget {
|
||||
padding: const EdgeInsets.all(10),
|
||||
decoration: BoxDecoration(
|
||||
color: hpDark.withValues(alpha: 0.2),
|
||||
border: Border.all(
|
||||
color: hpColor.withValues(alpha: 0.4),
|
||||
),
|
||||
border: Border.all(color: hpColor.withValues(alpha: 0.4)),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
const Text(
|
||||
'🔥',
|
||||
style: TextStyle(fontSize: 16),
|
||||
),
|
||||
const Text('🔥', style: TextStyle(fontSize: 16)),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Column(
|
||||
@@ -383,10 +370,7 @@ class DeathOverlay extends StatelessWidget {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
asciiIcon,
|
||||
style: TextStyle(fontSize: 14, color: valueColor),
|
||||
),
|
||||
Text(asciiIcon, style: TextStyle(fontSize: 14, color: valueColor)),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
label,
|
||||
@@ -433,14 +417,8 @@ class DeathOverlay extends StatelessWidget {
|
||||
border: Border(
|
||||
top: BorderSide(color: expColor, width: 3),
|
||||
left: BorderSide(color: expColor, width: 3),
|
||||
bottom: BorderSide(
|
||||
color: expDark.withValues(alpha: 0.8),
|
||||
width: 3,
|
||||
),
|
||||
right: BorderSide(
|
||||
color: expDark.withValues(alpha: 0.8),
|
||||
width: 3,
|
||||
),
|
||||
bottom: BorderSide(color: expDark.withValues(alpha: 0.8), width: 3),
|
||||
right: BorderSide(color: expDark.withValues(alpha: 0.8), width: 3),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
@@ -478,7 +456,9 @@ class DeathOverlay extends StatelessWidget {
|
||||
|
||||
// 활성화 상태에 따른 색상
|
||||
final buttonColor = isAutoResurrectEnabled ? mpColor : muted;
|
||||
final buttonDark = isAutoResurrectEnabled ? mpDark : muted.withValues(alpha: 0.5);
|
||||
final buttonDark = isAutoResurrectEnabled
|
||||
? mpDark
|
||||
: muted.withValues(alpha: 0.5);
|
||||
|
||||
return GestureDetector(
|
||||
onTap: onToggleAutoResurrect,
|
||||
@@ -551,10 +531,7 @@ class DeathOverlay extends StatelessWidget {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
const Text(
|
||||
'📜',
|
||||
style: TextStyle(fontSize: 12),
|
||||
),
|
||||
const Text('📜', style: TextStyle(fontSize: 12)),
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
l10n.deathCombatLog.toUpperCase(),
|
||||
@@ -595,10 +572,7 @@ class DeathOverlay extends StatelessWidget {
|
||||
padding: const EdgeInsets.symmetric(vertical: 1),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
asciiIcon,
|
||||
style: TextStyle(fontSize: 10, color: color),
|
||||
),
|
||||
Text(asciiIcon, style: TextStyle(fontSize: 10, color: color)),
|
||||
const SizedBox(width: 4),
|
||||
Expanded(
|
||||
child: Text(
|
||||
|
||||
@@ -645,10 +645,12 @@ class _EnhancedAnimationPanelState extends State<EnhancedAnimationPanel>
|
||||
// 몬스터 등급에 따른 접두사와 색상
|
||||
final grade = widget.monsterGrade;
|
||||
final isKillTask = widget.progress.currentTask.type == TaskType.kill;
|
||||
final gradePrefix =
|
||||
(isKillTask && grade != null) ? grade.displayPrefix : '';
|
||||
final gradeColor =
|
||||
(isKillTask && grade != null) ? grade.displayColor : null;
|
||||
final gradePrefix = (isKillTask && grade != null)
|
||||
? grade.displayPrefix
|
||||
: '';
|
||||
final gradeColor = (isKillTask && grade != null)
|
||||
? grade.displayColor
|
||||
: null;
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
|
||||
@@ -75,22 +75,10 @@ class _HelpDialogState extends State<HelpDialog>
|
||||
child: TabBarView(
|
||||
controller: _tabController,
|
||||
children: [
|
||||
_BasicsHelpView(
|
||||
isKorean: isKorean,
|
||||
isJapanese: isJapanese,
|
||||
),
|
||||
_CombatHelpView(
|
||||
isKorean: isKorean,
|
||||
isJapanese: isJapanese,
|
||||
),
|
||||
_SkillsHelpView(
|
||||
isKorean: isKorean,
|
||||
isJapanese: isJapanese,
|
||||
),
|
||||
_UIHelpView(
|
||||
isKorean: isKorean,
|
||||
isJapanese: isJapanese,
|
||||
),
|
||||
_BasicsHelpView(isKorean: isKorean, isJapanese: isJapanese),
|
||||
_CombatHelpView(isKorean: isKorean, isJapanese: isJapanese),
|
||||
_SkillsHelpView(isKorean: isKorean, isJapanese: isJapanese),
|
||||
_UIHelpView(isKorean: isKorean, isJapanese: isJapanese),
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -102,10 +90,7 @@ class _HelpDialogState extends State<HelpDialog>
|
||||
|
||||
/// 기본 도움말 뷰
|
||||
class _BasicsHelpView extends StatelessWidget {
|
||||
const _BasicsHelpView({
|
||||
required this.isKorean,
|
||||
required this.isJapanese,
|
||||
});
|
||||
const _BasicsHelpView({required this.isKorean, required this.isJapanese});
|
||||
|
||||
final bool isKorean;
|
||||
final bool isJapanese;
|
||||
@@ -178,10 +163,7 @@ class _BasicsHelpView extends StatelessWidget {
|
||||
|
||||
/// 전투 도움말 뷰
|
||||
class _CombatHelpView extends StatelessWidget {
|
||||
const _CombatHelpView({
|
||||
required this.isKorean,
|
||||
required this.isJapanese,
|
||||
});
|
||||
const _CombatHelpView({required this.isKorean, required this.isJapanese});
|
||||
|
||||
final bool isKorean;
|
||||
final bool isJapanese;
|
||||
@@ -254,10 +236,7 @@ class _CombatHelpView extends StatelessWidget {
|
||||
|
||||
/// 스킬 도움말 뷰
|
||||
class _SkillsHelpView extends StatelessWidget {
|
||||
const _SkillsHelpView({
|
||||
required this.isKorean,
|
||||
required this.isJapanese,
|
||||
});
|
||||
const _SkillsHelpView({required this.isKorean, required this.isJapanese});
|
||||
|
||||
final bool isKorean;
|
||||
final bool isJapanese;
|
||||
@@ -351,10 +330,7 @@ class _SkillsHelpView extends StatelessWidget {
|
||||
|
||||
/// UI 도움말 뷰
|
||||
class _UIHelpView extends StatelessWidget {
|
||||
const _UIHelpView({
|
||||
required this.isKorean,
|
||||
required this.isJapanese,
|
||||
});
|
||||
const _UIHelpView({required this.isKorean, required this.isJapanese});
|
||||
|
||||
final bool isKorean;
|
||||
final bool isJapanese;
|
||||
|
||||
@@ -223,11 +223,15 @@ class _HpMpBarState extends State<HpMpBar> with TickerProviderStateMixin {
|
||||
// 플래시 색상 (데미지=빨강, 회복=녹색)
|
||||
final flashColor = isDamage
|
||||
? RetroColors.hpRed.withValues(alpha: flashController.value * 0.4)
|
||||
: RetroColors.expGreen.withValues(alpha: flashController.value * 0.4);
|
||||
: RetroColors.expGreen.withValues(
|
||||
alpha: flashController.value * 0.4,
|
||||
);
|
||||
|
||||
// 위험 깜빡임 배경
|
||||
final lowBgColor = isLow
|
||||
? RetroColors.hpRed.withValues(alpha: (1 - _blinkAnimation.value) * 0.3)
|
||||
? RetroColors.hpRed.withValues(
|
||||
alpha: (1 - _blinkAnimation.value) * 0.3,
|
||||
)
|
||||
: Colors.transparent;
|
||||
|
||||
return Container(
|
||||
@@ -263,7 +267,9 @@ class _HpMpBarState extends State<HpMpBar> with TickerProviderStateMixin {
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 8,
|
||||
fontWeight: FontWeight.bold,
|
||||
color: isDamage ? RetroColors.hpRed : RetroColors.expGreen,
|
||||
color: isDamage
|
||||
? RetroColors.hpRed
|
||||
: RetroColors.expGreen,
|
||||
shadows: const [
|
||||
Shadow(color: Colors.black, blurRadius: 3),
|
||||
Shadow(color: Colors.black, blurRadius: 6),
|
||||
@@ -314,10 +320,7 @@ class _HpMpBarState extends State<HpMpBar> with TickerProviderStateMixin {
|
||||
height: 12,
|
||||
decoration: BoxDecoration(
|
||||
color: emptyColor.withValues(alpha: 0.3),
|
||||
border: Border.all(
|
||||
color: RetroColors.panelBorderOuter,
|
||||
width: 1,
|
||||
),
|
||||
border: Border.all(color: RetroColors.panelBorderOuter, width: 1),
|
||||
),
|
||||
child: Row(
|
||||
children: List.generate(segmentCount, (index) {
|
||||
@@ -331,8 +334,9 @@ class _HpMpBarState extends State<HpMpBar> with TickerProviderStateMixin {
|
||||
border: Border(
|
||||
right: index < segmentCount - 1
|
||||
? BorderSide(
|
||||
color: RetroColors.panelBorderOuter
|
||||
.withValues(alpha: 0.3),
|
||||
color: RetroColors.panelBorderOuter.withValues(
|
||||
alpha: 0.3,
|
||||
),
|
||||
width: 1,
|
||||
)
|
||||
: BorderSide.none,
|
||||
@@ -420,8 +424,9 @@ class _HpMpBarState extends State<HpMpBar> with TickerProviderStateMixin {
|
||||
decoration: BoxDecoration(
|
||||
color: isFilled
|
||||
? RetroColors.gold
|
||||
: RetroColors.panelBorderOuter
|
||||
.withValues(alpha: 0.3),
|
||||
: RetroColors.panelBorderOuter.withValues(
|
||||
alpha: 0.3,
|
||||
),
|
||||
border: Border(
|
||||
right: index < segmentCount - 1
|
||||
? BorderSide(
|
||||
|
||||
@@ -119,7 +119,10 @@ class _NotificationCard extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final (accentColor, icon, asciiIcon) = _getStyleForType(context, 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);
|
||||
@@ -260,8 +263,16 @@ class _NotificationCard extends StatelessWidget {
|
||||
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.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, 'ℹ'),
|
||||
|
||||
@@ -25,10 +25,8 @@ class StatisticsDialog extends StatefulWidget {
|
||||
return showDialog(
|
||||
context: context,
|
||||
barrierColor: Colors.black87,
|
||||
builder: (_) => StatisticsDialog(
|
||||
session: session,
|
||||
cumulative: cumulative,
|
||||
),
|
||||
builder: (_) =>
|
||||
StatisticsDialog(session: session, cumulative: cumulative),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -92,9 +92,7 @@ class TaskProgressPanel extends StatelessWidget {
|
||||
children: [
|
||||
_buildPauseButton(context),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: _buildStatusMessage(context),
|
||||
),
|
||||
Expanded(child: _buildStatusMessage(context)),
|
||||
const SizedBox(width: 8),
|
||||
_buildSpeedButton(context),
|
||||
],
|
||||
@@ -162,10 +160,12 @@ class TaskProgressPanel extends StatelessWidget {
|
||||
// 몬스터 등급에 따른 접두사와 색상
|
||||
final grade = monsterGrade;
|
||||
final isKillTask = progress.currentTask.type == TaskType.kill;
|
||||
final gradePrefix =
|
||||
(isKillTask && grade != null) ? grade.displayPrefix : '';
|
||||
final gradeColor =
|
||||
(isKillTask && grade != null) ? grade.displayColor : null;
|
||||
final gradePrefix = (isKillTask && grade != null)
|
||||
? grade.displayPrefix
|
||||
: '';
|
||||
final gradeColor = (isKillTask && grade != null)
|
||||
? grade.displayColor
|
||||
: null;
|
||||
|
||||
return Text.rich(
|
||||
TextSpan(
|
||||
@@ -173,10 +173,7 @@ class TaskProgressPanel extends StatelessWidget {
|
||||
if (gradePrefix.isNotEmpty)
|
||||
TextSpan(
|
||||
text: gradePrefix,
|
||||
style: TextStyle(
|
||||
color: gradeColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
style: TextStyle(color: gradeColor, fontWeight: FontWeight.bold),
|
||||
),
|
||||
TextSpan(
|
||||
text: message,
|
||||
|
||||
@@ -52,9 +52,10 @@ class _VictoryOverlayState extends State<VictoryOverlay>
|
||||
vsync: this,
|
||||
);
|
||||
|
||||
_scrollAnimation = Tween<double>(begin: 0.0, end: 1.0).animate(
|
||||
CurvedAnimation(parent: _scrollController, curve: Curves.linear),
|
||||
);
|
||||
_scrollAnimation = Tween<double>(
|
||||
begin: 0.0,
|
||||
end: 1.0,
|
||||
).animate(CurvedAnimation(parent: _scrollController, curve: Curves.linear));
|
||||
|
||||
// 스크롤 완료 시 버튼 표시 (자동 종료하지 않음)
|
||||
_scrollController.addStatusListener((status) {
|
||||
@@ -380,26 +381,43 @@ class _VictoryOverlayState extends State<VictoryOverlay>
|
||||
final hours = playTime.inHours;
|
||||
final minutes = playTime.inMinutes % 60;
|
||||
final seconds = playTime.inSeconds % 60;
|
||||
final playTimeStr = '${hours.toString().padLeft(2, '0')}:'
|
||||
final playTimeStr =
|
||||
'${hours.toString().padLeft(2, '0')}:'
|
||||
'${minutes.toString().padLeft(2, '0')}:'
|
||||
'${seconds.toString().padLeft(2, '0')}';
|
||||
|
||||
return Column(
|
||||
children: [
|
||||
_buildStatLine(l10n.endingMonstersSlain,
|
||||
'${widget.progress.monstersKilled}', textPrimary, exp),
|
||||
const SizedBox(height: 8),
|
||||
_buildStatLine(l10n.endingQuestsCompleted,
|
||||
'${widget.progress.questCount}', textPrimary, exp),
|
||||
_buildStatLine(
|
||||
l10n.endingMonstersSlain,
|
||||
'${widget.progress.monstersKilled}',
|
||||
textPrimary,
|
||||
exp,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
_buildStatLine(
|
||||
l10n.endingPlayTime, playTimeStr, textPrimary, textPrimary),
|
||||
l10n.endingQuestsCompleted,
|
||||
'${widget.progress.questCount}',
|
||||
textPrimary,
|
||||
exp,
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
_buildStatLine(
|
||||
l10n.endingPlayTime,
|
||||
playTimeStr,
|
||||
textPrimary,
|
||||
textPrimary,
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildStatLine(
|
||||
String label, String value, Color labelColor, Color valueColor) {
|
||||
String label,
|
||||
String value,
|
||||
Color labelColor,
|
||||
Color valueColor,
|
||||
) {
|
||||
return Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
|
||||
Reference in New Issue
Block a user