fix(ui): 퀘스트 리스트를 원본처럼 히스토리 형태로 수정
- _buildQuestList에서 questHistory를 리스트로 표시 - 완료된 퀘스트: 체크 표시 + 취소선 - 현재 퀘스트: 화살표 아이콘 - 원본 PQ의 Quests TListView와 동일한 동작
This commit is contained in:
@@ -656,33 +656,51 @@ class _GamePlayScreenState extends State<GamePlayScreen>
|
|||||||
|
|
||||||
Widget _buildQuestList(GameState state) {
|
Widget _buildQuestList(GameState state) {
|
||||||
final l10n = L10n.of(context);
|
final l10n = L10n.of(context);
|
||||||
final questCount = state.progress.questCount;
|
final questHistory = state.progress.questHistory;
|
||||||
if (questCount == 0) {
|
|
||||||
|
if (questHistory.isEmpty) {
|
||||||
return Center(
|
return Center(
|
||||||
child: Text(l10n.noActiveQuests, style: const TextStyle(fontSize: 11)),
|
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),
|
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
children: [
|
itemBuilder: (context, index) {
|
||||||
Row(
|
final quest = questHistory[index];
|
||||||
|
final isCurrentQuest = index == questHistory.length - 1 && !quest.isComplete;
|
||||||
|
|
||||||
|
return Row(
|
||||||
children: [
|
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(
|
Expanded(
|
||||||
child: Text(
|
child: Text(
|
||||||
currentTask.caption.isNotEmpty
|
quest.caption,
|
||||||
? currentTask.caption
|
style: TextStyle(
|
||||||
: l10n.questNumber(questCount),
|
fontSize: 11,
|
||||||
style: const TextStyle(fontSize: 11),
|
decoration: quest.isComplete
|
||||||
|
? TextDecoration.lineThrough
|
||||||
|
: TextDecoration.none,
|
||||||
|
),
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
);
|
||||||
],
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user