49 lines
1.2 KiB
C#
49 lines
1.2 KiB
C#
using System.Collections.Generic;
|
|
using Dalamud.Bindings.ImGui;
|
|
using Questionable.Controller;
|
|
|
|
namespace Questionable.Windows.QuestComponents;
|
|
|
|
internal sealed class RemainingTasksComponent
|
|
{
|
|
private readonly QuestController _questController;
|
|
|
|
private readonly GatheringController _gatheringController;
|
|
|
|
public RemainingTasksComponent(QuestController questController, GatheringController gatheringController)
|
|
{
|
|
_questController = questController;
|
|
_gatheringController = gatheringController;
|
|
}
|
|
|
|
public void Draw()
|
|
{
|
|
IList<string> remainingTaskNames = _gatheringController.GetRemainingTaskNames();
|
|
if (remainingTaskNames.Count > 0)
|
|
{
|
|
ImGui.Separator();
|
|
ImGui.BeginDisabled();
|
|
foreach (string item in remainingTaskNames)
|
|
{
|
|
ImU8String text = new ImU8String(3, 1);
|
|
text.AppendLiteral("G: ");
|
|
text.AppendFormatted(item);
|
|
ImGui.TextUnformatted(text);
|
|
}
|
|
ImGui.EndDisabled();
|
|
return;
|
|
}
|
|
IList<string> remainingTaskNames2 = _questController.GetRemainingTaskNames();
|
|
if (remainingTaskNames2.Count <= 0)
|
|
{
|
|
return;
|
|
}
|
|
ImGui.Separator();
|
|
ImGui.BeginDisabled();
|
|
foreach (string item2 in remainingTaskNames2)
|
|
{
|
|
ImGui.TextUnformatted(item2);
|
|
}
|
|
ImGui.EndDisabled();
|
|
}
|
|
}
|