feat(game): 게임 세션 및 사망 오버레이 개선
- GameSessionController 기능 확장 - DeathOverlay 상세 사망 정보 표시 - GamePlayScreen 연동 업데이트
This commit is contained in:
@@ -15,6 +15,8 @@ class DeathOverlay extends StatelessWidget {
|
||||
required this.deathInfo,
|
||||
required this.traits,
|
||||
required this.onResurrect,
|
||||
this.isAutoResurrectEnabled = false,
|
||||
this.onToggleAutoResurrect,
|
||||
});
|
||||
|
||||
/// 사망 정보
|
||||
@@ -26,6 +28,12 @@ class DeathOverlay extends StatelessWidget {
|
||||
/// 부활 버튼 콜백
|
||||
final VoidCallback onResurrect;
|
||||
|
||||
/// 자동 부활 활성화 여부
|
||||
final bool isAutoResurrectEnabled;
|
||||
|
||||
/// 자동 부활 토글 콜백
|
||||
final VoidCallback? onToggleAutoResurrect;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// 테마 인식 색상 (Theme-aware colors)
|
||||
@@ -132,6 +140,12 @@ class DeathOverlay extends StatelessWidget {
|
||||
|
||||
// 부활 버튼
|
||||
_buildResurrectButton(context),
|
||||
|
||||
// 자동 부활 버튼
|
||||
if (onToggleAutoResurrect != null) ...[
|
||||
const SizedBox(height: 12),
|
||||
_buildAutoResurrectButton(context),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -456,6 +470,75 @@ class DeathOverlay extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
/// 자동 부활 토글 버튼
|
||||
Widget _buildAutoResurrectButton(BuildContext context) {
|
||||
final mpColor = RetroColors.mpOf(context);
|
||||
final mpDark = RetroColors.mpDarkOf(context);
|
||||
final muted = RetroColors.textMutedOf(context);
|
||||
|
||||
// 활성화 상태에 따른 색상
|
||||
final buttonColor = isAutoResurrectEnabled ? mpColor : muted;
|
||||
final buttonDark = isAutoResurrectEnabled ? mpDark : muted.withValues(alpha: 0.5);
|
||||
|
||||
return GestureDetector(
|
||||
onTap: onToggleAutoResurrect,
|
||||
child: Container(
|
||||
width: double.infinity,
|
||||
padding: const EdgeInsets.symmetric(vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
color: buttonColor.withValues(alpha: 0.15),
|
||||
border: Border(
|
||||
top: BorderSide(color: buttonColor, width: 2),
|
||||
left: BorderSide(color: buttonColor, width: 2),
|
||||
bottom: BorderSide(
|
||||
color: buttonDark.withValues(alpha: 0.8),
|
||||
width: 2,
|
||||
),
|
||||
right: BorderSide(
|
||||
color: buttonDark.withValues(alpha: 0.8),
|
||||
width: 2,
|
||||
),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
isAutoResurrectEnabled ? '◉' : '○',
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
color: buttonColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Text(
|
||||
l10n.deathAutoResurrect.toUpperCase(),
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 8,
|
||||
color: buttonColor,
|
||||
letterSpacing: 1,
|
||||
),
|
||||
),
|
||||
if (isAutoResurrectEnabled) ...[
|
||||
const SizedBox(width: 6),
|
||||
Text(
|
||||
'ON',
|
||||
style: TextStyle(
|
||||
fontFamily: 'PressStart2P',
|
||||
fontSize: 8,
|
||||
color: mpColor,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
],
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/// 사망 직전 전투 로그 표시
|
||||
Widget _buildCombatLog(BuildContext context) {
|
||||
final events = deathInfo.lastCombatEvents;
|
||||
|
||||
Reference in New Issue
Block a user