muffin v7.4.10
This commit is contained in:
parent
2df81c5d15
commit
b8dd142c23
47 changed files with 3604 additions and 1058 deletions
|
|
@ -57,7 +57,7 @@ internal sealed class ActiveQuestComponent
|
|||
public event EventHandler? Reload;
|
||||
|
||||
[GeneratedRegex("\\s\\s+", RegexOptions.IgnoreCase, "en-US")]
|
||||
[GeneratedCode("System.Text.RegularExpressions.Generator", "10.0.13.7005")]
|
||||
[GeneratedCode("System.Text.RegularExpressions.Generator", "10.0.13.11305")]
|
||||
private static Regex MultipleWhitespaceRegex()
|
||||
{
|
||||
return _003CRegexGenerator_g_003EFBB8301322196CF81C64F1652C2FA6E1D6BF3907141F781E9D97ABED51BF056C4__MultipleWhitespaceRegex_0.Instance;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ internal sealed class ManualPriorityComponent
|
|||
_questSelector.QuestSelected = delegate(Quest quest)
|
||||
{
|
||||
manualPriorityComponent._questController.ManualPriorityQuests.Add(quest);
|
||||
manualPriorityComponent._questController.SavePriorityQuests();
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -92,9 +93,9 @@ internal sealed class ManualPriorityComponent
|
|||
ExportToClipboard();
|
||||
}
|
||||
ImGui.SameLine();
|
||||
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Check, "Remove finished Quests"))
|
||||
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Check, "Remove finished Quests") && _questController.ManualPriorityQuests.RemoveAll((Quest q) => _questFunctions.IsQuestComplete(q.Id)) > 0)
|
||||
{
|
||||
_questController.ManualPriorityQuests.RemoveAll((Quest q) => _questFunctions.IsQuestComplete(q.Id));
|
||||
_questController.SavePriorityQuests();
|
||||
}
|
||||
ImGui.SameLine();
|
||||
using (ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl)))
|
||||
|
|
@ -212,11 +213,13 @@ internal sealed class ManualPriorityComponent
|
|||
if (quest != null)
|
||||
{
|
||||
manualPriorityQuests.Remove(quest);
|
||||
_questController.SavePriorityQuests();
|
||||
}
|
||||
if (quest2 != null)
|
||||
{
|
||||
manualPriorityQuests.Remove(quest2);
|
||||
manualPriorityQuests.Insert(index, quest2);
|
||||
_questController.SavePriorityQuests();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Dalamud.Bindings.ImGui;
|
||||
|
|
@ -35,6 +36,8 @@ internal sealed class QuestSequenceComponent
|
|||
|
||||
private int _hoveredSequenceId = -1;
|
||||
|
||||
public bool HasLookedUpQuest => _lookedUpQuestId != null;
|
||||
|
||||
public QuestSequenceComponent(QuestData questData, QuestRegistry questRegistry, QuestFunctions questFunctions, IDataManager dataManager, ILogger<QuestSequenceComponent> logger)
|
||||
{
|
||||
_questData = questData;
|
||||
|
|
@ -96,6 +99,26 @@ internal sealed class QuestSequenceComponent
|
|||
{
|
||||
DrawEmptyState(FontAwesomeIcon.QuestionCircle, "No Active Quest", "Accept a quest to view its sequence information.", new Vector4(0.6f, 0.5f, 0.8f, 0.7f));
|
||||
}
|
||||
if (!(tuple.Item1 is QuestId questId))
|
||||
{
|
||||
return;
|
||||
}
|
||||
ImGui.Spacing();
|
||||
if (ImGui.Button("Copy filename"))
|
||||
{
|
||||
if (_questData.TryGetQuestInfo(questId, out IQuestInfo questInfo))
|
||||
{
|
||||
ImGui.SetClipboardText(GetSequenceFilename(questId.Value, questInfo.Name));
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui.SetClipboardText(GetSequenceFilename(questId.Value, questId.Value.ToString(CultureInfo.InvariantCulture)));
|
||||
}
|
||||
}
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Copies filename as QuestID_QuestNameWithSpaces.json");
|
||||
}
|
||||
}
|
||||
|
||||
public void DrawQuestLookupTab()
|
||||
|
|
@ -230,6 +253,25 @@ internal sealed class QuestSequenceComponent
|
|||
text.AppendFormatted(questId.Value);
|
||||
text.AppendLiteral(")");
|
||||
ImGui.TextColored(in col, text);
|
||||
ImGui.SameLine();
|
||||
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f);
|
||||
using (ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.18f, 0.16f, 0.22f, 0.8f)))
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.28f, 0.24f, 0.32f, 0.95f)))
|
||||
{
|
||||
using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.35f, 0.3f, 0.45f, 1f)))
|
||||
{
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Copy))
|
||||
{
|
||||
ImGui.SetClipboardText(GetSequenceFilename(questId.Value, questInfo.Name));
|
||||
}
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
ImGui.SetTooltip("Copies filename as QuestID_QuestNameWithSpaces.json");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (currentSequence.HasValue)
|
||||
{
|
||||
ImGui.SameLine();
|
||||
|
|
@ -592,4 +634,15 @@ internal sealed class QuestSequenceComponent
|
|||
}
|
||||
ImGui.SetCursorScreenPos(cursorScreenPos + new Vector2(0f, vector.Y));
|
||||
}
|
||||
|
||||
private static string GetSequenceFilename(int questId, string questName)
|
||||
{
|
||||
string value = (questName ?? string.Empty).Trim();
|
||||
return $"{questId}_{value}.json";
|
||||
}
|
||||
|
||||
public void SetLookedUpQuest(ElementId? id)
|
||||
{
|
||||
_lookedUpQuestId = id;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue