fix(ui): 퀘스트 리스트를 원본처럼 히스토리 형태로 수정

- _buildQuestList에서 questHistory를 리스트로 표시
- 완료된 퀘스트: 체크 표시 + 취소선
- 현재 퀘스트: 화살표 아이콘
- 원본 PQ의 Quests TListView와 동일한 동작
This commit is contained in:
JiWoong Sul
2025-12-12 15:35:46 +09:00
parent 13198f9f1f
commit 8314aea578

View File

@@ -656,33 +656,51 @@ class _GamePlayScreenState extends State<GamePlayScreen>
Widget _buildQuestList(GameState state) {
final l10n = L10n.of(context);
final questCount = state.progress.questCount;
if (questCount == 0) {
final questHistory = state.progress.questHistory;
if (questHistory.isEmpty) {
return Center(
child: Text(l10n.noActiveQuests, style: const TextStyle(fontSize: 11)),
);
}
// 현재 퀘스트 캡션이 있으면 표시
final currentTask = state.progress.currentTask;
return ListView(
// 원본처럼 퀘스트 히스토리를 리스트로 표시
// 완료된 퀘스트는 체크박스, 현재 퀘스트는 화살표
return ListView.builder(
itemCount: questHistory.length,
padding: const EdgeInsets.symmetric(horizontal: 8),
children: [
Row(
itemBuilder: (context, index) {
final quest = questHistory[index];
final isCurrentQuest = index == questHistory.length - 1 && !quest.isComplete;
return Row(
children: [
const Icon(Icons.arrow_right, size: 14),
if (isCurrentQuest)
const Icon(Icons.arrow_right, size: 14)
else
Icon(
quest.isComplete
? Icons.check_box
: Icons.check_box_outline_blank,
size: 14,
color: quest.isComplete ? Colors.green : Colors.grey,
),
const SizedBox(width: 4),
Expanded(
child: Text(
currentTask.caption.isNotEmpty
? currentTask.caption
: l10n.questNumber(questCount),
style: const TextStyle(fontSize: 11),
quest.caption,
style: TextStyle(
fontSize: 11,
decoration: quest.isComplete
? TextDecoration.lineThrough
: TextDecoration.none,
),
overflow: TextOverflow.ellipsis,
),
),
],
),
],
);
},
);
}