1
0
Fork 0
forked from aly/qstbak

muffin v7.5.1

This commit is contained in:
alydev 2026-05-01 08:59:48 +10:00
parent a6481e7b9a
commit 965a736f84
59 changed files with 4112 additions and 5059 deletions

View file

@ -57,9 +57,6 @@ internal sealed class ManualPriorityComponent
public void Draw()
{
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00b1: Unknown result type (might be due to invalid IL or missing references)
ImGui.TextWrapped("When you have an active Main Scenario Quest, Questionable will prioritise quests in this order:");
ImGui.BulletText("Priority quests: class quests, A Realm Reborn primals and raids");
ImGui.BulletText("Supported quests from your Journal's To-Do list (always visible on-screen quests)");
@ -73,34 +70,23 @@ internal sealed class ManualPriorityComponent
{
ImGui.Text("Priority queue (drag arrow buttons to reorder):");
}
ChildDisposable val = ImRaii.Child((ImU8String)"ManualPriorityList", new Vector2(-1f, -27f), true);
try
using (ImRaii.ChildDisposable childDisposable = ImRaii.Child("ManualPriorityList", new Vector2(-1f, -27f), border: true))
{
if (ChildDisposable.op_Implicit(val))
if ((bool)childDisposable)
{
DrawQuestList();
}
}
finally
{
((ChildDisposable)(ref val)).Dispose();
}
List<ElementId> list = ParseClipboardItems();
DisabledDisposable val2 = ImRaii.Disabled(list.Count == 0);
try
using (ImRaii.Disabled(list.Count == 0))
{
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Download, "Import from Clipboard"))
{
ImportFromClipboard(list);
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
ImGui.SameLine();
val2 = ImRaii.Disabled(_questController.ManualPriorityQuests.Count == 0);
try
using (ImRaii.Disabled(_questController.ManualPriorityQuests.Count == 0))
{
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Upload, "Export to Clipboard"))
{
@ -112,27 +98,18 @@ internal sealed class ManualPriorityComponent
_questController.SavePriorityQuests();
}
ImGui.SameLine();
DisabledDisposable val3 = ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl));
try
using (ImRaii.Disabled(!ImGui.IsKeyDown(ImGuiKey.ModCtrl)))
{
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Trash, "Clear All"))
{
_questController.ClearQuestPriority();
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
{
ImGui.SetTooltip("Hold CTRL to enable this button.");
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
private void DrawQuestList()
@ -154,11 +131,10 @@ internal sealed class ManualPriorityComponent
{
Vector2 item = ImGui.GetCursorScreenPos() + new Vector2(0f, (0f - ImGui.GetStyle().ItemSpacing.Y) / 2f);
Quest quest3 = manualPriorityQuests[i];
ImU8String imU8String = new ImU8String(5, 1);
imU8String.AppendLiteral("Quest");
imU8String.AppendFormatted(quest3.Id);
IdDisposable val = ImRaii.PushId(imU8String, true);
try
ImU8String id = new ImU8String(5, 1);
id.AppendLiteral("Quest");
id.AppendFormatted(quest3.Id);
using (ImRaii.PushId(id))
{
ImGui.AlignTextToFramePadding();
ImU8String text = new ImU8String(1, 1);
@ -184,15 +160,10 @@ internal sealed class ManualPriorityComponent
}
if (manualPriorityQuests.Count > 1)
{
FontDisposable val2 = ImRaii.PushFont(UiBuilder.IconFont, true);
try
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.SameLine(ImGui.GetContentRegionAvail().X + ImGui.GetStyle().WindowPadding.X - ImGui.CalcTextSize(FontAwesomeIcon.ArrowsUpDown.ToIconString()).X - ImGui.CalcTextSize(FontAwesomeIcon.Times.ToIconString()).X - ImGui.GetStyle().FramePadding.X * 4f - ImGui.GetStyle().ItemSpacing.X);
}
finally
{
((IDisposable)val2)?.Dispose();
}
if (_draggedItem == quest3.Id)
{
ImGuiComponents.IconButton("##Move", FontAwesomeIcon.ArrowsUpDown, ImGui.ColorConvertU32ToFloat4(ImGui.GetColorU32(ImGuiCol.ButtonActive)));
@ -209,25 +180,16 @@ internal sealed class ManualPriorityComponent
}
else
{
FontDisposable val2 = ImRaii.PushFont(UiBuilder.IconFont, true);
try
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.SameLine(ImGui.GetContentRegionAvail().X + ImGui.GetStyle().WindowPadding.X - ImGui.CalcTextSize(FontAwesomeIcon.Times.ToIconString()).X - ImGui.GetStyle().FramePadding.X * 2f);
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
if (ImGuiComponents.IconButton($"##Remove{i}", FontAwesomeIcon.Times))
{
quest = quest3;
}
}
finally
{
((IDisposable)val)?.Dispose();
}
Vector2 item2 = new Vector2(item.X + x, ImGui.GetCursorScreenPos().Y - ImGui.GetStyle().ItemSpacing.Y + 2f);
list.Add((item, item2));
}