diff --git a/lib/src/features/game/widgets/hp_mp_bar.dart b/lib/src/features/game/widgets/hp_mp_bar.dart index 361d8b4..daf2a31 100644 --- a/lib/src/features/game/widgets/hp_mp_bar.dart +++ b/lib/src/features/game/widgets/hp_mp_bar.dart @@ -307,10 +307,8 @@ class _HpMpBarState extends State with TickerProviderStateMixin { /// 몬스터 HP 바 Widget _buildMonsterBar() { - final current = widget.monsterHpCurrent!; final max = widget.monsterHpMax!; - final ratio = max > 0 ? current / max : 0.0; - final name = widget.monsterName ?? 'Enemy'; + final ratio = max > 0 ? widget.monsterHpCurrent! / max : 0.0; return AnimatedBuilder( animation: _monsterFlashAnimation, @@ -332,30 +330,9 @@ class _HpMpBarState extends State with TickerProviderStateMixin { child: Stack( clipBehavior: Clip.none, children: [ + // HP 바만 표시 (공간 제약으로 아이콘/이름 생략) Row( children: [ - // 몬스터 아이콘 - const Icon(Icons.pest_control, size: 14, color: Colors.orange), - const SizedBox(width: 4), - - // 이름 (Flexible로 공간 부족 시 축소) - Flexible( - flex: 0, - child: ConstrainedBox( - constraints: const BoxConstraints(maxWidth: 50), - child: Text( - name.length > 8 ? '${name.substring(0, 6)}...' : name, - style: const TextStyle( - fontSize: 9, - fontWeight: FontWeight.bold, - color: Colors.orange, - ), - overflow: TextOverflow.ellipsis, - ), - ), - ), - const SizedBox(width: 4), - // HP 바 Expanded( child: ClipRRect( @@ -370,15 +347,10 @@ class _HpMpBarState extends State with TickerProviderStateMixin { ), ), const SizedBox(width: 4), - - // HP 숫자 (Flexible로 오버플로우 방지) - Flexible( - child: Text( - '$current/$max', - style: const TextStyle(fontSize: 8, color: Colors.orange), - textAlign: TextAlign.right, - overflow: TextOverflow.ellipsis, - ), + // HP 퍼센트 + Text( + '${(ratio * 100).toInt()}%', + style: const TextStyle(fontSize: 8, color: Colors.orange), ), ], ),