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

@ -1,4 +1,3 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
@ -29,33 +28,44 @@ internal sealed class ChangelogWindow : LWindow
private float _headerAnimationTime;
private bool _closeRequested;
public ChangelogWindow(Configuration configuration, IDalamudPluginInterface pluginInterface)
: base("Questionable Changelog###QuestionableChangelog", ImGuiWindowFlags.NoTitleBar)
: base("Questionable Changelog###QuestionableChangelog", ImGuiWindowFlags.NoTitleBar | ImGuiWindowFlags.NoScrollbar | ImGuiWindowFlags.NoScrollWithMouse)
{
//IL_0086: Unknown result type (might be due to invalid IL or missing references)
_configuration = configuration;
_pluginInterface = pluginInterface;
_headerComponent = new ChangelogHeaderComponent();
_footerComponent = new ChangelogFooterComponent();
base.Size = new Vector2(900f, 650f);
base.SizeCondition = ImGuiCond.FirstUseEver;
WindowSizeConstraints value = default(WindowSizeConstraints);
((WindowSizeConstraints)(ref value))._002Ector();
((WindowSizeConstraints)(ref value)).MinimumSize = new Vector2(700f, 500f);
((WindowSizeConstraints)(ref value)).MaximumSize = new Vector2(float.MaxValue, float.MaxValue);
((Window)this).SizeConstraints = value;
base.SizeConstraints = new WindowSizeConstraints
{
MinimumSize = new Vector2(700f, 500f),
MaximumSize = new Vector2(float.MaxValue, float.MaxValue)
};
}
public override void PreDraw()
{
base.PreDraw();
if (_closeRequested)
{
_closeRequested = false;
base.IsOpen = false;
}
}
public override void DrawContent()
{
_headerComponent.Draw(delegate(bool isOpen)
_headerComponent.Draw(delegate
{
base.IsOpen = isOpen;
_closeRequested = true;
});
DrawChangelogEntries();
ChangelogFooterComponent.Draw(delegate
{
base.IsOpen = false;
_closeRequested = true;
});
ImDrawListPtr windowDrawList = ImGui.GetWindowDrawList();
Vector2 windowPos = ImGui.GetWindowPos();
@ -80,90 +90,50 @@ internal sealed class ChangelogWindow : LWindow
private void DrawChangelogEntries()
{
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00e3: Unknown result type (might be due to invalid IL or missing references)
//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
//IL_0103: Unknown result type (might be due to invalid IL or missing references)
//IL_0108: Unknown result type (might be due to invalid IL or missing references)
//IL_010a: Unknown result type (might be due to invalid IL or missing references)
_headerAnimationTime += ImGui.GetIO().DeltaTime;
ColorDisposable val = ImRaii.PushColor(ImGuiCol.ScrollbarBg, new Vector4(0.1f, 0.08f, 0.14f, 0.6f), true);
try
using (ImRaii.PushColor(ImGuiCol.ScrollbarBg, new Vector4(0.1f, 0.08f, 0.14f, 0.6f)))
{
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.ScrollbarGrab, new Vector4(0.55f, 0.45f, 0.75f, 0.4f), true);
try
using (ImRaii.PushColor(ImGuiCol.ScrollbarGrab, new Vector4(0.55f, 0.45f, 0.75f, 0.4f)))
{
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ScrollbarGrabHovered, new Vector4(0.65f, 0.55f, 0.85f, 0.6f), true);
try
using (ImRaii.PushColor(ImGuiCol.ScrollbarGrabHovered, new Vector4(0.65f, 0.55f, 0.85f, 0.6f)))
{
ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.ScrollbarGrabActive, new Vector4(0.75f, 0.55f, 0.95f, 0.8f), true);
try
using (ImRaii.PushColor(ImGuiCol.ScrollbarGrabActive, new Vector4(0.75f, 0.55f, 0.95f, 0.8f)))
{
float num = ImGui.GetFrameHeightWithSpacing() + ImGui.GetStyle().ItemSpacing.Y * 2f;
ChildDisposable val5 = ImRaii.Child((ImU8String)"ChangelogScroll", new Vector2(0f, 0f - num), false, ImGuiWindowFlags.NoScrollbar);
try
float num = ImGui.GetFrameHeightWithSpacing() + 16f;
using ImRaii.ChildDisposable childDisposable = ImRaii.Child("ChangelogScroll", new Vector2(0f, 0f - num), border: false, ImGuiWindowFlags.NoScrollbar);
if (!childDisposable)
{
if (!val5)
{
return;
}
ChildDisposable val6 = ImRaii.Child((ImU8String)"ChangelogScrollInner", Vector2.Zero, false);
try
{
if (!val6)
{
return;
}
List<ChangelogEntry> changelogs = ChangelogData.Changelogs;
ChangelogEntry changelogEntry = changelogs.FirstOrDefault();
if (changelogs.Count == 0)
{
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 40f);
Vector2 vector = ImGui.CalcTextSize("No changelog entries available.");
ImGui.SetCursorPosX((ImGui.GetContentRegionAvail().X - vector.X) * 0.5f);
ImGui.TextDisabled("No changelog entries available.");
return;
}
ChangelogEntryComponent changelogEntryComponent = new ChangelogEntryComponent(_configuration, _windowOpenCount, _headerAnimationTime);
foreach (ChangelogEntry item in changelogs)
{
changelogEntryComponent.Draw(item, item == changelogEntry, _hasSetInitialState);
Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
float num2 = ImGui.GetContentRegionAvail().X * 0.5f;
float num3 = (ImGui.GetContentRegionAvail().X - num2) * 0.5f;
ImGui.GetWindowDrawList().AddLine(cursorScreenPos + new Vector2(num3, 0f), cursorScreenPos + new Vector2(num3 + num2, 0f), ImGui.ColorConvertFloat4ToU32(new Vector4(0.55f, 0.45f, 0.75f, 0.1f)), 1f);
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 4f);
}
_hasSetInitialState = true;
}
finally
{
((ChildDisposable)(ref val6)).Dispose();
}
return;
}
finally
using ImRaii.ChildDisposable childDisposable2 = ImRaii.Child("ChangelogScrollInner", Vector2.Zero, border: false);
if (!childDisposable2)
{
((ChildDisposable)(ref val5)).Dispose();
return;
}
}
finally
{
((IDisposable)val4)?.Dispose();
List<ChangelogEntry> changelogs = ChangelogData.Changelogs;
ChangelogEntry changelogEntry = changelogs.FirstOrDefault();
if (changelogs.Count == 0)
{
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 40f);
Vector2 vector = ImGui.CalcTextSize("No changelog entries available.");
ImGui.SetCursorPosX((ImGui.GetContentRegionAvail().X - vector.X) * 0.5f);
ImGui.TextDisabled("No changelog entries available.");
return;
}
ChangelogEntryComponent changelogEntryComponent = new ChangelogEntryComponent(_configuration, _windowOpenCount, _headerAnimationTime);
foreach (ChangelogEntry item in changelogs)
{
changelogEntryComponent.Draw(item, item == changelogEntry, _hasSetInitialState);
Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
float num2 = ImGui.GetContentRegionAvail().X * 0.5f;
float num3 = (ImGui.GetContentRegionAvail().X - num2) * 0.5f;
ImGui.GetWindowDrawList().AddLine(cursorScreenPos + new Vector2(num3, 0f), cursorScreenPos + new Vector2(num3 + num2, 0f), ImGui.ColorConvertFloat4ToU32(new Vector4(0.55f, 0.45f, 0.75f, 0.1f)), 1f);
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 4f);
}
_hasSetInitialState = true;
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
finally
{
((IDisposable)val)?.Dispose();
}
}