From 56b568a8329b43d3f13a68962bf8fb3822b07519 Mon Sep 17 00:00:00 2001 From: JiWoong Sul Date: Thu, 8 Jan 2026 15:46:34 +0900 Subject: [PATCH] =?UTF-8?q?refactor(game):=20=EA=B2=8C=EC=9E=84=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=B0=8F=20=EB=A1=9C=EC=BB=AC?= =?UTF-8?q?=EB=9D=BC=EC=9D=B4=EC=A0=9C=EC=9D=B4=EC=85=98=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - GamePlayScreen 개선 - CharacterSheetPage 정리 - StoryPage 단순화 - 로컬라이제이션 정리 --- lib/src/features/game/game_play_screen.dart | 4 +--- .../game/pages/character_sheet_page.dart | 4 +--- lib/src/features/game/pages/story_page.dart | 23 ++++--------------- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/lib/src/features/game/game_play_screen.dart b/lib/src/features/game/game_play_screen.dart index a58bdf0..b6c02a6 100644 --- a/lib/src/features/game/game_play_screen.dart +++ b/lib/src/features/game/game_play_screen.dart @@ -1087,9 +1087,7 @@ class _GamePlayScreenState extends State state.progress.exp.position, state.progress.exp.max, Colors.blue, - tooltip: - '${state.progress.exp.max - state.progress.exp.position} ' - '${l10n.xpNeededForNextLevel}', + tooltip: '${state.progress.exp.position} / ${state.progress.exp.max}', ), // 스킬 (Skills - SpellBook 기반) diff --git a/lib/src/features/game/pages/character_sheet_page.dart b/lib/src/features/game/pages/character_sheet_page.dart index 4b4f521..c757ea0 100644 --- a/lib/src/features/game/pages/character_sheet_page.dart +++ b/lib/src/features/game/pages/character_sheet_page.dart @@ -105,11 +105,9 @@ class CharacterSheetPage extends StatelessWidget { } Widget _buildExpBar(BuildContext context) { - final localizations = L10n.of(context); final progress = exp.max > 0 ? (exp.position / exp.max).clamp(0.0, 1.0) : 0.0; - final remaining = exp.max - exp.position; return Padding( padding: const EdgeInsets.all(12), @@ -123,7 +121,7 @@ class CharacterSheetPage extends StatelessWidget { ), const SizedBox(height: 4), Text( - '$remaining ${localizations.xpNeededForNextLevel}', + '${exp.position} / ${exp.max}', style: TextStyle(fontSize: 10, color: Colors.grey.shade600), ), ], diff --git a/lib/src/features/game/pages/story_page.dart b/lib/src/features/game/pages/story_page.dart index 0d7928c..671a6f4 100644 --- a/lib/src/features/game/pages/story_page.dart +++ b/lib/src/features/game/pages/story_page.dart @@ -1,9 +1,7 @@ import 'package:flutter/material.dart'; -import 'package:asciineverdie/data/game_text_l10n.dart' as l10n; import 'package:asciineverdie/l10n/app_localizations.dart'; import 'package:asciineverdie/src/core/model/game_state.dart'; -import 'package:asciineverdie/src/core/util/pq_logic.dart' as pq_logic; /// 스토리 페이지 (캐로셀) /// @@ -104,25 +102,14 @@ class StoryPage extends StatelessWidget { final progress = plot.max > 0 ? (plot.position / plot.max).clamp(0.0, 1.0) : 0.0; - final remaining = plot.max - plot.position; - final remainingTime = pq_logic.roughTime(remaining); return Padding( padding: const EdgeInsets.all(12), - child: Column( - children: [ - LinearProgressIndicator( - value: progress, - backgroundColor: Colors.purple.withValues(alpha: 0.2), - valueColor: const AlwaysStoppedAnimation(Colors.purple), - minHeight: 12, - ), - const SizedBox(height: 4), - Text( - l10n.uiTimeRemaining(remainingTime), - style: TextStyle(fontSize: 10, color: Colors.grey.shade600), - ), - ], + child: LinearProgressIndicator( + value: progress, + backgroundColor: Colors.purple.withValues(alpha: 0.2), + valueColor: const AlwaysStoppedAnimation(Colors.purple), + minHeight: 12, ), ); }