refactor(game): 게임 페이지 및 로컬라이제이션 정리
- GamePlayScreen 개선 - CharacterSheetPage 정리 - StoryPage 단순화 - 로컬라이제이션 정리
This commit is contained in:
@@ -1087,9 +1087,7 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
||||
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 기반)
|
||||
|
||||
@@ -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),
|
||||
),
|
||||
],
|
||||
|
||||
@@ -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<Color>(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<Color>(Colors.purple),
|
||||
minHeight: 12,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user