Fix color corruption on Allied Society tab

This commit is contained in:
Liza 2024-12-16 18:26:30 +01:00
parent 2213ccb033
commit 1bcc027639
Signed by: liza
GPG Key ID: 2C41B84815CF6445
2 changed files with 20 additions and 8 deletions

View File

@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>4.7</Version>
<Version>4.8</Version>
</PropertyGroup>
</Project>

View File

@ -57,16 +57,28 @@ internal sealed class AlliedSocietyJournalComponent
if (quests.Count == 0)
continue;
bool containsNewQuests = quests.Any(x => !_questFunctions.IsQuestComplete(x.QuestId));
if (containsNewQuests)
ImGui.PushStyleColor(ImGuiCol.Text, ImGuiColors.DalamudYellow);
string label = $"{alliedSociety}###AlliedSociety{(int)alliedSociety}";
#if DEBUG
bool isOpen;
if (quests.Any(x => !_questRegistry.IsKnownQuest(x.QuestId)))
{
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudOrange))
isOpen = ImGui.CollapsingHeader(label);
}
else if (quests.Any(x => !_questFunctions.IsQuestComplete(x.QuestId)))
{
using (ImRaii.PushColor(ImGuiCol.Text, ImGuiColors.DalamudYellow))
isOpen = ImGui.CollapsingHeader(label);
}
else
isOpen = ImGui.CollapsingHeader(label);
#else
bool isOpen = ImGui.CollapsingHeader(label);
#endif
if (!ImGui.CollapsingHeader($"{alliedSociety}###AlliedSociety{(int)alliedSociety}"))
if (!isOpen)
continue;
if (containsNewQuests)
ImGui.PopStyleColor();
if (alliedSociety <= EAlliedSociety.Ixal)
{
for (byte i = 1; i <= 8; ++i)