feat(hall): Phase 10 명예의 전당 시스템 구현

- HallOfFameEntry 모델 및 HallOfFame 컬렉션 추가
- HallOfFameStorage 저장소 (JSON 파일 기반)
- HallOfFameScreen UI (순위별 색상/아이콘)
- 게임 클리어 시 명예의 전당 등록 처리
- FrontScreen에 명예의 전당 버튼 추가
- 클리어 축하 다이얼로그 구현
This commit is contained in:
JiWoong Sul
2025-12-17 18:57:26 +09:00
parent 7c7f3b0d9e
commit 9af5c4dc13
6 changed files with 814 additions and 2 deletions

View File

@@ -3,7 +3,12 @@ import 'package:flutter/material.dart';
import 'package:askiineverdie/l10n/app_localizations.dart';
class FrontScreen extends StatelessWidget {
const FrontScreen({super.key, this.onNewCharacter, this.onLoadSave});
const FrontScreen({
super.key,
this.onNewCharacter,
this.onLoadSave,
this.onHallOfFame,
});
/// "New character" 버튼 클릭 시 호출
final void Function(BuildContext context)? onNewCharacter;
@@ -11,6 +16,9 @@ class FrontScreen extends StatelessWidget {
/// "Load save" 버튼 클릭 시 호출
final Future<void> Function(BuildContext context)? onLoadSave;
/// "Hall of Fame" 버튼 클릭 시 호출 (Phase 10)
final void Function(BuildContext context)? onHallOfFame;
@override
Widget build(BuildContext context) {
final theme = Theme.of(context);
@@ -43,6 +51,9 @@ class FrontScreen extends StatelessWidget {
onLoadSave: onLoadSave != null
? () => onLoadSave!(context)
: () => _showPlaceholder(context),
onHallOfFame: onHallOfFame != null
? () => onHallOfFame!(context)
: null,
),
const SizedBox(height: 24),
const _StatusCards(),
@@ -150,10 +161,15 @@ class _HeroHeader extends StatelessWidget {
}
class _ActionRow extends StatelessWidget {
const _ActionRow({required this.onNewCharacter, required this.onLoadSave});
const _ActionRow({
required this.onNewCharacter,
required this.onLoadSave,
this.onHallOfFame,
});
final VoidCallback onNewCharacter;
final VoidCallback onLoadSave;
final VoidCallback? onHallOfFame;
@override
Widget build(BuildContext context) {
@@ -187,6 +203,13 @@ class _ActionRow extends StatelessWidget {
icon: const Icon(Icons.menu_book_outlined),
label: Text(l10n.viewBuildPlan),
),
// Phase 10: 명예의 전당 버튼
if (onHallOfFame != null)
TextButton.icon(
onPressed: onHallOfFame,
icon: const Icon(Icons.emoji_events_outlined),
label: const Text('Hall of Fame'),
),
],
);
}