refactor(ui): 기타 화면 정리

- FrontScreen, HallOfFameScreen 개선
- NewCharacterScreen, SettingsScreen 정리
- App 초기화 로직 정리
This commit is contained in:
JiWoong Sul
2026-01-12 16:17:25 +09:00
parent cbbbbba1a5
commit 448f500ca0
7 changed files with 287 additions and 131 deletions

View File

@@ -469,18 +469,20 @@ class _AskiiNeverDieAppState extends State<AskiiNeverDieApp> {
}
void _navigateToNewCharacter(BuildContext context) {
Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (context) => NewCharacterScreen(
onCharacterCreated: (initialState, {bool testMode = false}) {
_startGame(context, initialState, testMode: testMode);
},
),
),
).then((_) {
// 새 게임 후 돌아오면 세이브 정보 갱신 (BGM은 _checkForExistingSave에서 재생)
_checkForExistingSave();
});
Navigator.of(context)
.push(
MaterialPageRoute<void>(
builder: (context) => NewCharacterScreen(
onCharacterCreated: (initialState, {bool testMode = false}) {
_startGame(context, initialState, testMode: testMode);
},
),
),
)
.then((_) {
// 새 게임 후 돌아오면 세이브 정보 갱신 (BGM은 _checkForExistingSave에서 재생)
_checkForExistingSave();
});
}
Future<void> _loadSave(BuildContext context) async {
@@ -544,44 +546,50 @@ class _AskiiNeverDieAppState extends State<AskiiNeverDieApp> {
}
void _navigateToGame(BuildContext context) {
Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (context) => GamePlayScreen(
controller: _controller,
audioService: _audioService,
// 디버그 모드로 저장된 게임 로드 시 캐로셀 레이아웃 강제
forceCarouselLayout: _controller.cheatsEnabled,
currentThemeMode: _themeMode,
onThemeModeChange: _changeThemeMode,
),
),
).then((_) {
// 게임에서 돌아오면 세이브 정보 갱신 (BGM은 _checkForExistingSave에서 재생)
_checkForExistingSave();
});
Navigator.of(context)
.push(
MaterialPageRoute<void>(
builder: (context) => GamePlayScreen(
controller: _controller,
audioService: _audioService,
// 디버그 모드로 저장된 게임 로드 시 캐로셀 레이아웃 강제
forceCarouselLayout: _controller.cheatsEnabled,
currentThemeMode: _themeMode,
onThemeModeChange: _changeThemeMode,
),
),
)
.then((_) {
// 게임에서 돌아오면 세이브 정보 갱신 (BGM은 _checkForExistingSave에서 재생)
_checkForExistingSave();
});
}
/// Phase 10: 명예의 전당 화면으로 이동
void _navigateToHallOfFame(BuildContext context) {
Navigator.of(context).push(
MaterialPageRoute<void>(builder: (context) => const HallOfFameScreen()),
).then((_) {
// 명예의 전당에서 돌아오면 타이틀 BGM 재생
_audioService.playBgm('title');
});
Navigator.of(context)
.push(
MaterialPageRoute<void>(
builder: (context) => const HallOfFameScreen(),
),
)
.then((_) {
// 명예의 전당에서 돌아오면 타이틀 BGM 재생
_audioService.playBgm('title');
});
}
/// 로컬 아레나 화면으로 이동
void _navigateToArena(BuildContext context) {
Navigator.of(context).push(
MaterialPageRoute<void>(
builder: (context) => const ArenaScreen(),
),
).then((_) {
// 아레나에서 돌아오면 명예의 전당 다시 로드 및 타이틀 BGM 재생
_loadHallOfFame();
_audioService.playBgm('title');
});
Navigator.of(context)
.push(
MaterialPageRoute<void>(builder: (context) => const ArenaScreen()),
)
.then((_) {
// 아레나에서 돌아오면 명예의 전당 다시 로드 및 타이틀 BGM 재생
_loadHallOfFame();
_audioService.playBgm('title');
});
}
}
@@ -636,10 +644,7 @@ class _SplashScreen extends StatelessWidget {
fontSize: 14,
color: RetroColors.cream,
shadows: [
Shadow(
color: RetroColors.brown,
offset: Offset(1, 1),
),
Shadow(color: RetroColors.brown, offset: Offset(1, 1)),
],
),
),
@@ -648,10 +653,7 @@ class _SplashScreen extends StatelessWidget {
),
const SizedBox(height: 32),
// 레트로 로딩 바
SizedBox(
width: 160,
child: _RetroLoadingBar(),
),
SizedBox(width: 160, child: _RetroLoadingBar()),
],
),
),