Update some UI color coding
authorLiza Carvelli <liza@carvel.li>
Wed, 25 Dec 2024 23:28:09 +0000 (00:28 +0100)
committerLiza Carvelli <liza@carvel.li>
Wed, 25 Dec 2024 23:28:09 +0000 (00:28 +0100)
Questionable/Windows/JournalComponents/AlliedSocietyJournalComponent.cs
Questionable/Windows/QuestComponents/QuestTooltipComponent.cs

index c7e506029336e4cc0d18858cda35325ecc04750f..a5ae13b3e5bde987f5f0499e8b86d2c313b63076 100644 (file)
@@ -60,7 +60,7 @@ internal sealed class AlliedSocietyJournalComponent
             string label = $"{alliedSociety}###AlliedSociety{(int)alliedSociety}";
 #if DEBUG
             bool isOpen;
-            if (quests.Any(x => !_questRegistry.IsKnownQuest(x.QuestId)))
+            if (quests.Any(x => !_questRegistry.TryGetQuest(x.QuestId, out var quest) || quest.Root.Disabled))
             {
                 using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
                     isOpen = ImGui.CollapsingHeader(label);
@@ -103,7 +103,7 @@ internal sealed class AlliedSocietyJournalComponent
     private void DrawQuest(QuestInfo questInfo)
     {
         var (color, icon, tooltipText) = _uiUtils.GetQuestStyle(questInfo.QuestId);
-        if (!_questRegistry.TryGetQuest(questInfo.QuestId, out var quest))
+        if (!_questRegistry.TryGetQuest(questInfo.QuestId, out var quest) || quest.Root.Disabled)
             color = ImGuiColors.DalamudGrey;
 
         if (_uiUtils.ChecklistItem($"{questInfo.Name} ({tooltipText})", color, icon))
index 3f426f6c8e02dbe0965e7068399c3b664fdb690c..4d4f1d2c3fb412ce81c130c59f88733573b89747 100644 (file)
@@ -60,6 +60,12 @@ internal sealed class QuestTooltipComponent
 
             if (_questRegistry.TryGetQuest(questInfo.QuestId, out Quest? quest))
             {
+                if (quest.Root.Disabled)
+                {
+                    ImGui.SameLine();
+                    ImGui.TextColored(ImGuiColors.DalamudRed, "Disabled");
+                }
+
                 if (quest.Root.Author.Count == 1)
                     ImGui.Text($"Author: {quest.Root.Author[0]}");
                 else
@@ -68,7 +74,7 @@ internal sealed class QuestTooltipComponent
             else
             {
                 ImGui.SameLine();
-                ImGui.TextUnformatted("NoQuestPath");
+                ImGui.TextColored(ImGuiColors.DalamudRed, "NoQuestPath");
             }
 
             DrawQuestUnlocks(questInfo, 0);