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

@ -62,33 +62,18 @@ internal sealed class QuestSequenceComponent
ImGui.TextColored(new Vector4(0.98f, 0.98f, 1f, 1f), "Quest Sequence Viewer");
ImGui.SameLine(x - 35f);
ImGui.SetCursorPosY(ImGui.GetCursorPosY() - num2 + ImGui.GetStyle().ItemSpacing.Y);
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero, true);
try
using (ImRaii.PushColor(ImGuiCol.Button, Vector4.Zero))
{
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.8f, 0.3f, 0.3f, 0.4f), true);
try
using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.8f, 0.3f, 0.3f, 0.4f)))
{
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.9f, 0.2f, 0.2f, 0.6f), true);
try
using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.9f, 0.2f, 0.2f, 0.6f)))
{
if (ImGuiComponents.IconButton(FontAwesomeIcon.Times))
{
isOpen = false;
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.SetCursorPosY(cursorScreenPos.Y + num - ImGui.GetCursorScreenPos().Y + ImGui.GetCursorPosY());
}
@ -146,40 +131,29 @@ internal sealed class QuestSequenceComponent
windowDrawList.AddRect(cursorScreenPos, cursorScreenPos + new Vector2(x, y), ImGui.ColorConvertFloat4ToU32(new Vector4(0.6f, 0.5f, 0.8f, 0.2f)), 4f, ImDrawFlags.None, 1f);
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + ImGui.GetStyle().ItemSpacing.Y * 1.5f);
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 10f);
FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true);
try
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.TextColored(new Vector4(0.7f, 0.6f, 0.9f, 1f), FontAwesomeIcon.Search.ToIconString());
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.SameLine();
float x2 = ImGui.GetStyle().ItemSpacing.X;
float num = 10f;
float num2 = 10f;
float num3 = ImGui.CalcTextSize("Search").X + ImGui.CalcTextSize(FontAwesomeIcon.Search.ToIconString()).X + ImGui.GetStyle().FramePadding.X * 4f + x2;
ImGui.SetNextItemWidth(x - num3 - x2 * 3f - num - num2);
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.FrameBg, new Vector4(0.08f, 0.06f, 0.12f, 0.8f), true);
try
using (ImRaii.PushColor(ImGuiCol.FrameBg, new Vector4(0.08f, 0.06f, 0.12f, 0.8f)))
{
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.FrameBgHovered, new Vector4(0.12f, 0.1f, 0.18f, 0.9f), true);
try
using (ImRaii.PushColor(ImGuiCol.FrameBgHovered, new Vector4(0.12f, 0.1f, 0.18f, 0.9f)))
{
ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.FrameBgActive, new Vector4(0.15f, 0.13f, 0.22f, 1f), true);
try
using (ImRaii.PushColor(ImGuiCol.FrameBgActive, new Vector4(0.15f, 0.13f, 0.22f, 1f)))
{
bool flag = ImGui.InputTextWithHint("##QuestLookup", "Enter quest ID...", ref _questLookupInput, 10, ImGuiInputTextFlags.EnterReturnsTrue);
ImGui.SameLine();
ColorDisposable val5 = ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.25f, 0.22f, 0.32f, 0.8f), true);
try
using (ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.25f, 0.22f, 0.32f, 0.8f)))
{
ColorDisposable val6 = ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.35f, 0.3f, 0.45f, 0.9f), true);
try
using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.35f, 0.3f, 0.45f, 0.9f)))
{
ColorDisposable val7 = ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.4f, 0.35f, 0.5f, 1f), true);
try
using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.4f, 0.35f, 0.5f, 1f)))
{
bool flag2 = ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Search, "Search");
if (flag || flag2)
@ -194,34 +168,10 @@ internal sealed class QuestSequenceComponent
}
}
}
finally
{
((IDisposable)val7)?.Dispose();
}
}
finally
{
((IDisposable)val6)?.Dispose();
}
}
finally
{
((IDisposable)val5)?.Dispose();
}
}
finally
{
((IDisposable)val4)?.Dispose();
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + ImGui.GetStyle().ItemSpacing.Y * 1.5f);
ImGui.Spacing();
@ -305,14 +255,11 @@ internal sealed class QuestSequenceComponent
ImGui.TextColored(in col, text);
ImGui.SameLine();
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8f);
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.18f, 0.16f, 0.22f, 0.8f), true);
try
using (ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.18f, 0.16f, 0.22f, 0.8f)))
{
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.28f, 0.24f, 0.32f, 0.95f), true);
try
using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.28f, 0.24f, 0.32f, 0.95f)))
{
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.35f, 0.3f, 0.45f, 1f), true);
try
using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.35f, 0.3f, 0.45f, 1f)))
{
if (ImGuiComponents.IconButton(FontAwesomeIcon.Copy))
{
@ -323,19 +270,7 @@ internal sealed class QuestSequenceComponent
ImGui.SetTooltip("Copies filename as QuestID_QuestNameWithSpaces.json");
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
finally
{
((IDisposable)val)?.Dispose();
}
if (currentSequence.HasValue)
{
@ -431,115 +366,95 @@ internal sealed class QuestSequenceComponent
private static void DrawSummaryCards(int totalSequences, int maxSeq, bool hasQuestPath, float coverage, Vector4 coverageColor, int implementedCount, int expectedCount)
{
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_004c: Unknown result type (might be due to invalid IL or missing references)
TableDisposable val = ImRaii.Table((ImU8String)"SummaryCards", 2, ImGuiTableFlags.None);
try
using ImRaii.TableDisposable tableDisposable = ImRaii.Table("SummaryCards", 2, ImGuiTableFlags.None);
if (!tableDisposable)
{
if (!val)
return;
}
ImGui.TableSetupColumn("GameData", ImGuiTableColumnFlags.WidthStretch, 0.4f);
ImGui.TableSetupColumn("QuestPath", ImGuiTableColumnFlags.WidthStretch, 0.6f);
ImGui.TableNextRow();
ImGui.TableNextColumn();
DrawCard(80f, new Vector4(0.6f, 0.85f, 1f, 1f), FontAwesomeIcon.Gamepad, "Expected Sequences", delegate
{
ImGui.Spacing();
ImGui.Indent(10f);
Vector4 col = new Vector4(0.9f, 0.9f, 0.98f, 1f);
ImU8String text = new ImU8String(6, 0);
text.AppendLiteral("Count:");
ImGui.TextColored(in col, text);
ImGui.SameLine();
col = new Vector4(0.7f, 0.9f, 1f, 1f);
ImU8String text2 = new ImU8String(0, 1);
text2.AppendFormatted(totalSequences);
ImGui.TextColored(in col, text2);
ImGui.Spacing();
col = new Vector4(0.9f, 0.9f, 0.98f, 1f);
ImU8String text3 = new ImU8String(6, 0);
text3.AppendLiteral("Range:");
ImGui.TextColored(in col, text3);
ImGui.SameLine();
col = new Vector4(0.7f, 0.9f, 1f, 1f);
ImU8String text4 = new ImU8String(9, 1);
text4.AppendLiteral("0 → ");
text4.AppendFormatted(maxSeq);
text4.AppendLiteral(", 255");
ImGui.TextColored(in col, text4);
ImGui.Unindent(10f);
});
ImGui.TableNextColumn();
DrawCard(80f, new Vector4(0.5f, 1f, 0.6f, 1f), FontAwesomeIcon.Code, "Implementation Status", delegate
{
if (hasQuestPath)
{
return;
ImGui.Indent(10f);
ImGui.TextColored(new Vector4(0.9f, 0.9f, 0.98f, 1f), "Progress:");
ImGui.SameLine();
ref Vector4 col = ref coverageColor;
ImU8String text = new ImU8String(0, 1);
text.AppendFormatted(implementedCount);
ImGui.TextColored(in col, text);
ImGui.SameLine();
ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.8f, 1f), "/");
ImGui.SameLine();
Vector4 col2 = new Vector4(0.9f, 0.9f, 0.98f, 1f);
ImU8String text2 = new ImU8String(0, 1);
text2.AppendFormatted(expectedCount);
ImGui.TextColored(in col2, text2);
ImGui.SameLine();
ref Vector4 col3 = ref coverageColor;
ImU8String text3 = new ImU8String(3, 1);
text3.AppendLiteral("(");
text3.AppendFormatted(coverage, "F0");
text3.AppendLiteral("%)");
ImGui.TextColored(in col3, text3);
ImGui.Spacing();
Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
float x = ImGui.GetContentRegionAvail().X - 10f;
using (ImRaii.PushColor(ImGuiCol.PlotHistogram, coverageColor))
{
using (ImRaii.PushColor(ImGuiCol.FrameBg, new Vector4(0.08f, 0.06f, 0.12f, 0.8f)))
{
ImGui.ProgressBar(coverage / 100f, new Vector2(x, 16f), "");
}
}
ImGui.GetWindowDrawList().AddRect(cursorScreenPos, cursorScreenPos + new Vector2(x, 16f), ImGui.ColorConvertFloat4ToU32(new Vector4(0.6f, 0.5f, 0.8f, 0.3f)), 2f);
ImGui.Unindent(10f);
}
ImGui.TableSetupColumn("GameData", ImGuiTableColumnFlags.WidthStretch, 0.4f);
ImGui.TableSetupColumn("QuestPath", ImGuiTableColumnFlags.WidthStretch, 0.6f);
ImGui.TableNextRow();
ImGui.TableNextColumn();
DrawCard(80f, new Vector4(0.6f, 0.85f, 1f, 1f), FontAwesomeIcon.Gamepad, "Expected Sequences", delegate
else
{
ImGui.Spacing();
ImGui.Indent(10f);
Vector4 col = new Vector4(0.9f, 0.9f, 0.98f, 1f);
ImU8String text = new ImU8String(6, 0);
text.AppendLiteral("Count:");
ImGui.TextColored(in col, text);
ImGui.PushFont(UiBuilder.IconFont);
ImGui.TextColored(new Vector4(0.6f, 0.5f, 0.8f, 0.8f), FontAwesomeIcon.Ban.ToIconString());
ImGui.PopFont();
ImGui.SameLine();
col = new Vector4(0.7f, 0.9f, 1f, 1f);
ImU8String text2 = new ImU8String(0, 1);
text2.AppendFormatted(totalSequences);
ImGui.TextColored(in col, text2);
ImGui.TextColored(new Vector4(0.6f, 0.5f, 0.8f, 0.8f), "Not Implemented");
ImGui.Spacing();
col = new Vector4(0.9f, 0.9f, 0.98f, 1f);
ImU8String text3 = new ImU8String(6, 0);
text3.AppendLiteral("Range:");
ImGui.TextColored(in col, text3);
ImGui.SameLine();
col = new Vector4(0.7f, 0.9f, 1f, 1f);
ImU8String text4 = new ImU8String(9, 1);
text4.AppendLiteral("0 → ");
text4.AppendFormatted(maxSeq);
text4.AppendLiteral(", 255");
ImGui.TextColored(in col, text4);
ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.8f, 1f), "No quest path data available");
ImGui.Unindent(10f);
});
ImGui.TableNextColumn();
DrawCard(80f, new Vector4(0.5f, 1f, 0.6f, 1f), FontAwesomeIcon.Code, "Implementation Status", delegate
{
if (hasQuestPath)
{
ImGui.Indent(10f);
ImGui.TextColored(new Vector4(0.9f, 0.9f, 0.98f, 1f), "Progress:");
ImGui.SameLine();
ref Vector4 col = ref coverageColor;
ImU8String text = new ImU8String(0, 1);
text.AppendFormatted(implementedCount);
ImGui.TextColored(in col, text);
ImGui.SameLine();
ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.8f, 1f), "/");
ImGui.SameLine();
Vector4 col2 = new Vector4(0.9f, 0.9f, 0.98f, 1f);
ImU8String text2 = new ImU8String(0, 1);
text2.AppendFormatted(expectedCount);
ImGui.TextColored(in col2, text2);
ImGui.SameLine();
ref Vector4 col3 = ref coverageColor;
ImU8String text3 = new ImU8String(3, 1);
text3.AppendLiteral("(");
text3.AppendFormatted(coverage, "F0");
text3.AppendLiteral("%)");
ImGui.TextColored(in col3, text3);
ImGui.Spacing();
Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
float x = ImGui.GetContentRegionAvail().X - 10f;
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.PlotHistogram, coverageColor, true);
try
{
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.FrameBg, new Vector4(0.08f, 0.06f, 0.12f, 0.8f), true);
try
{
ImGui.ProgressBar(coverage / 100f, new Vector2(x, 16f), "");
}
finally
{
((IDisposable)val3)?.Dispose();
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
ImGui.GetWindowDrawList().AddRect(cursorScreenPos, cursorScreenPos + new Vector2(x, 16f), ImGui.ColorConvertFloat4ToU32(new Vector4(0.6f, 0.5f, 0.8f, 0.3f)), 2f);
ImGui.Unindent(10f);
}
else
{
ImGui.Spacing();
ImGui.Indent(10f);
ImGui.PushFont(UiBuilder.IconFont);
ImGui.TextColored(new Vector4(0.6f, 0.5f, 0.8f, 0.8f), FontAwesomeIcon.Ban.ToIconString());
ImGui.PopFont();
ImGui.SameLine();
ImGui.TextColored(new Vector4(0.6f, 0.5f, 0.8f, 0.8f), "Not Implemented");
ImGui.Spacing();
ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.8f, 1f), "No quest path data available");
ImGui.Unindent(10f);
}
});
}
finally
{
((TableDisposable)(ref val)).Dispose();
}
}
});
}
private static void DrawCard(float height, Vector4 accentColor, FontAwesomeIcon icon, string title, System.Action content)
@ -564,100 +479,58 @@ internal sealed class QuestSequenceComponent
private void DrawSequenceGrid(int maxSeq, byte? currentSequence, HashSet<int> implementedSequences, Dictionary<int, (int StepCount, string? Comment)> sequenceDetails, bool hasEndSequence)
{
//IL_0092: Unknown result type (might be due to invalid IL or missing references)
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
//IL_0099: Unknown result type (might be due to invalid IL or missing references)
//IL_00fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0100: Unknown result type (might be due to invalid IL or missing references)
//IL_0102: Unknown result type (might be due to invalid IL or missing references)
int val = maxSeq + 2;
float x = ImGui.GetContentRegionAvail().X;
int val2 = Math.Max(4, Math.Min(8, (int)(x / 100f)));
val2 = Math.Min(val2, val);
float y = ImGui.GetContentRegionAvail().Y;
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ChildBg, new Vector4(0.08f, 0.06f, 0.12f, 0.6f), true);
try
using (ImRaii.PushColor(ImGuiCol.ChildBg, new Vector4(0.08f, 0.06f, 0.12f, 0.6f)))
{
ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.Border, new Vector4(0.6f, 0.5f, 0.8f, 0.2f), true);
try
using (ImRaii.PushColor(ImGuiCol.Border, new Vector4(0.6f, 0.5f, 0.8f, 0.2f)))
{
ChildDisposable val5 = ImRaii.Child((ImU8String)"SequenceGrid", new Vector2(-1f, y), true, ImGuiWindowFlags.None);
try
using ImRaii.ChildDisposable childDisposable = ImRaii.Child("SequenceGrid", new Vector2(-1f, y), border: true, ImGuiWindowFlags.None);
if (!(bool)childDisposable)
{
if (!ChildDisposable.op_Implicit(val5))
return;
}
using (ImRaii.PushColor(ImGuiCol.TableBorderStrong, new Vector4(0.6f, 0.5f, 0.8f, 0.2f)))
{
using (ImRaii.PushColor(ImGuiCol.TableBorderLight, new Vector4(0.6f, 0.5f, 0.8f, 0.15f)))
{
return;
}
ColorDisposable val6 = ImRaii.PushColor(ImGuiCol.TableBorderStrong, new Vector4(0.6f, 0.5f, 0.8f, 0.2f), true);
try
{
ColorDisposable val7 = ImRaii.PushColor(ImGuiCol.TableBorderLight, new Vector4(0.6f, 0.5f, 0.8f, 0.15f), true);
try
using ImRaii.TableDisposable tableDisposable = ImRaii.Table("SequenceGridTable", val2, ImGuiTableFlags.Borders | ImGuiTableFlags.SizingStretchSame);
if (!(bool)tableDisposable)
{
TableDisposable val8 = ImRaii.Table((ImU8String)"SequenceGridTable", val2, ImGuiTableFlags.Borders | ImGuiTableFlags.SizingStretchSame);
try
{
if (!TableDisposable.op_Implicit(val8))
{
return;
}
int num = 0;
for (int i = 0; i <= maxSeq; i++)
{
if (num % val2 == 0)
{
ImGui.TableNextRow();
}
ImGui.TableNextColumn();
DrawSequenceCell(i, currentSequence, implementedSequences, sequenceDetails);
num++;
}
if (num % val2 == 0)
{
ImGui.TableNextRow();
}
ImGui.TableNextColumn();
DrawSequenceCell(255, currentSequence, implementedSequences, sequenceDetails, hasEndSequence);
for (num++; num % val2 != 0; num++)
{
ImGui.TableNextColumn();
}
}
finally
{
((TableDisposable)(ref val8)).Dispose();
}
return;
}
finally
int num = 0;
for (int i = 0; i <= maxSeq; i++)
{
((IDisposable)val7)?.Dispose();
if (num % val2 == 0)
{
ImGui.TableNextRow();
}
ImGui.TableNextColumn();
DrawSequenceCell(i, currentSequence, implementedSequences, sequenceDetails);
num++;
}
if (num % val2 == 0)
{
ImGui.TableNextRow();
}
ImGui.TableNextColumn();
DrawSequenceCell(255, currentSequence, implementedSequences, sequenceDetails, hasEndSequence);
for (num++; num % val2 != 0; num++)
{
ImGui.TableNextColumn();
}
}
finally
{
((IDisposable)val6)?.Dispose();
}
}
finally
{
((ChildDisposable)(ref val5)).Dispose();
}
}
finally
{
((IDisposable)val4)?.Dispose();
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
}
private void DrawSequenceCell(int sequenceId, byte? currentSequence, HashSet<int> implementedSequences, Dictionary<int, (int StepCount, string? Comment)> sequenceDetails, bool? forcedImplemented = null)
{
//IL_035b: Unknown result type (might be due to invalid IL or missing references)
//IL_0360: Unknown result type (might be due to invalid IL or missing references)
bool flag = currentSequence.HasValue && sequenceId == currentSequence.Value;
bool flag2 = forcedImplemented ?? implementedSequences.Contains(sequenceId);
bool flag3 = _hoveredSequenceId == sequenceId;
@ -701,21 +574,15 @@ internal sealed class QuestSequenceComponent
if (ImGui.IsItemHovered())
{
_hoveredSequenceId = sequenceId;
TooltipDisposable val = ImRaii.Tooltip();
try
using (ImRaii.Tooltip())
{
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, new Vector4(0.98f, 0.98f, 1f, 1f), true);
try
using (ImRaii.PushColor(ImGuiCol.Text, new Vector4(0.98f, 0.98f, 1f, 1f)))
{
ImU8String text2 = new ImU8String(9, 1);
text2.AppendLiteral("Sequence ");
text2.AppendFormatted(sequenceId);
ImGui.Text(text2);
}
finally
{
((IDisposable)val2)?.Dispose();
}
ImGui.Separator();
if (flag2 && sequenceDetails.TryGetValue(sequenceId, out (int, string) value))
{
@ -760,10 +627,6 @@ internal sealed class QuestSequenceComponent
ImGui.TextColored(new Vector4(1f, 0.85f, 0.5f, 1f), "► Currently Active");
}
}
finally
{
((TooltipDisposable)(ref val)).Dispose();
}
}
else if (_hoveredSequenceId == sequenceId)
{