feat(game): 게임 텍스트 및 스토리 페이지 개선
- game_text_l10n: 새로운 텍스트 항목 추가 - game_play_screen: 기능 추가 - story_page: 레이아웃 조정
This commit is contained in:
@@ -1388,6 +1388,13 @@ String uiWeight(int weight) {
|
|||||||
return 'Wt.$weight';
|
return 'Wt.$weight';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 남은 시간 표시
|
||||||
|
String uiTimeRemaining(String time) {
|
||||||
|
if (isKoreanLocale) return '$time 남음';
|
||||||
|
if (isJapaneseLocale) return '残り$time';
|
||||||
|
return '$time remaining';
|
||||||
|
}
|
||||||
|
|
||||||
// 장비 슬롯 이름
|
// 장비 슬롯 이름
|
||||||
String get slotWeapon {
|
String get slotWeapon {
|
||||||
if (isKoreanLocale) return '무기';
|
if (isKoreanLocale) return '무기';
|
||||||
|
|||||||
@@ -515,6 +515,14 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
void didChangeDependencies() {
|
||||||
|
super.didChangeDependencies();
|
||||||
|
// 로케일 변경 시 게임 l10n 동기화 (시네마틱 번역 등에 필수)
|
||||||
|
final locale = Localizations.localeOf(context);
|
||||||
|
game_l10n.setGameLocale(locale.languageCode);
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
_notificationService.dispose();
|
_notificationService.dispose();
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
import 'package:askiineverdie/data/game_text_l10n.dart' as l10n;
|
||||||
import 'package:askiineverdie/l10n/app_localizations.dart';
|
import 'package:askiineverdie/l10n/app_localizations.dart';
|
||||||
import 'package:askiineverdie/src/core/model/game_state.dart';
|
import 'package:askiineverdie/src/core/model/game_state.dart';
|
||||||
import 'package:askiineverdie/src/core/util/pq_logic.dart' as pq_logic;
|
import 'package:askiineverdie/src/core/util/pq_logic.dart' as pq_logic;
|
||||||
@@ -118,7 +119,7 @@ class StoryPage extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(height: 4),
|
const SizedBox(height: 4),
|
||||||
Text(
|
Text(
|
||||||
'$remainingTime remaining',
|
l10n.uiTimeRemaining(remainingTime),
|
||||||
style: TextStyle(fontSize: 10, color: Colors.grey.shade600),
|
style: TextStyle(fontSize: 10, color: Colors.grey.shade600),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user