diff --git a/lib/src/features/game/game_play_screen.dart b/lib/src/features/game/game_play_screen.dart index 4e19868..7a2670f 100644 --- a/lib/src/features/game/game_play_screen.dart +++ b/lib/src/features/game/game_play_screen.dart @@ -745,6 +745,9 @@ class _GamePlayScreenState extends State setState(() => _sfxVolume = volume); widget.audioService?.setSfxVolume(volume); }, + // 통계 및 도움말 + onShowStatistics: () => _showStatisticsDialog(context), + onShowHelp: () => HelpDialog.show(context), ), // 사망 오버레이 if (state.isDead && state.deathInfo != null) diff --git a/lib/src/features/game/layouts/mobile_carousel_layout.dart b/lib/src/features/game/layouts/mobile_carousel_layout.dart index 1716deb..784950b 100644 --- a/lib/src/features/game/layouts/mobile_carousel_layout.dart +++ b/lib/src/features/game/layouts/mobile_carousel_layout.dart @@ -43,6 +43,8 @@ class MobileCarouselLayout extends StatefulWidget { this.sfxVolume = 0.8, this.onBgmVolumeChange, this.onSfxVolumeChange, + this.onShowStatistics, + this.onShowHelp, }); final GameState state; @@ -72,6 +74,12 @@ class MobileCarouselLayout extends StatefulWidget { /// SFX 볼륨 변경 콜백 final void Function(double volume)? onSfxVolumeChange; + /// 통계 표시 콜백 + final VoidCallback? onShowStatistics; + + /// 도움말 표시 콜백 + final VoidCallback? onShowHelp; + @override State createState() => _MobileCarouselLayoutState(); } @@ -349,10 +357,15 @@ class _MobileCarouselLayoutState extends State { showModalBottomSheet( context: context, + isScrollControlled: true, + constraints: BoxConstraints( + maxHeight: MediaQuery.of(context).size.height * 0.7, + ), builder: (context) => SafeArea( - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ // 헤더 Container( padding: const EdgeInsets.all(16), @@ -410,6 +423,32 @@ class _MobileCarouselLayoutState extends State { }, ), + const Divider(), + + // 통계 + if (widget.onShowStatistics != null) + ListTile( + leading: const Icon(Icons.bar_chart, color: Colors.blue), + title: Text(l10n.uiStatistics), + onTap: () { + Navigator.pop(context); + widget.onShowStatistics?.call(); + }, + ), + + // 도움말 + if (widget.onShowHelp != null) + ListTile( + leading: const Icon(Icons.help_outline, color: Colors.green), + title: Text(l10n.uiHelp), + onTap: () { + Navigator.pop(context); + widget.onShowHelp?.call(); + }, + ), + + const Divider(), + // 언어 변경 ListTile( leading: const Icon(Icons.language, color: Colors.teal), @@ -506,6 +545,7 @@ class _MobileCarouselLayoutState extends State { const SizedBox(height: 8), ], ), + ), ), ); }