muffin v7.5.0

This commit is contained in:
alydev 2026-05-01 05:17:35 +10:00
parent afafd5e377
commit a6481e7b9a
67 changed files with 4281 additions and 2372 deletions

View file

@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Numerics;
using Dalamud.Bindings.ImGui;
@ -40,26 +41,41 @@ internal static class ChangelogCategoryComponent
{
float cursorPosY = ImGui.GetCursorPosY();
ImGui.SetCursorPosX(baseX);
using (ImRaii.PushFont(UiBuilder.IconFont))
FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true);
try
{
ImGui.TextColored(in color, icon.ToIconString());
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.SameLine();
ImGui.SetCursorPosY(cursorPosY);
using (ImRaii.PushColor(ImGuiCol.Text, color))
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Text, color, true);
try
{
ImGui.TextUnformatted(text);
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
private static void DrawChange(ChangeEntry change, float baseX, float changeIndent)
{
ImGui.SetCursorPosX(baseX + changeIndent);
float cursorPosY = ImGui.GetCursorPosY();
using (ImRaii.PushFont(UiBuilder.IconFont))
FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true);
try
{
ImGui.TextColored(new Vector4(0.95f, 0.95f, 1f, 1f), FontAwesomeIcon.CaretRight.ToIconString());
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.SameLine();
ImGui.SetCursorPosY(cursorPosY);
float num = ImGui.GetContentRegionAvail().X - 8f;
@ -79,10 +95,15 @@ internal static class ChangelogCategoryComponent
{
ImGui.SetCursorPosX(baseX + num);
float cursorPosY = ImGui.GetCursorPosY();
using (ImRaii.PushFont(UiBuilder.IconFont))
FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true);
try
{
ImGui.TextColored(new Vector4(0.85f, 0.85f, 0.92f, 1f), FontAwesomeIcon.AngleRight.ToIconString());
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.SameLine();
ImGui.SetCursorPosY(cursorPosY);
float num2 = ImGui.GetContentRegionAvail().X - 8f;

View file

@ -37,20 +37,28 @@ internal sealed class ChangelogEntryComponent
string text2 = "v" + changelog.Version;
float fontSize = ImGui.GetFontSize();
float num = fontSize;
FontDisposable val = ImRaii.PushFont(UiBuilder.MonoFont, true);
Vector2 versionSize;
using (ImRaii.PushFont(UiBuilder.MonoFont))
try
{
versionSize = ImGui.CalcTextSize(text2);
}
finally
{
((IDisposable)val)?.Dispose();
}
Vector2 dateSize = ImGui.CalcTextSize(text);
float scaledIconFontSize = fontSize * 0.85f;
float x = ImGui.GetContentRegionAvail().X;
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.Header, new Vector4(0.2f, 0.18f, 0.25f, 0.6f), true);
bool flag;
using (ImRaii.PushColor(ImGuiCol.Header, new Vector4(0.2f, 0.18f, 0.25f, 0.6f)))
try
{
using (ImRaii.PushColor(ImGuiCol.HeaderHovered, new Vector4(0.3f, 0.25f, 0.35f, 0.8f)))
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.HeaderHovered, new Vector4(0.3f, 0.25f, 0.35f, 0.8f), true);
try
{
using (ImRaii.PushColor(ImGuiCol.HeaderActive, new Vector4(0.25f, 0.22f, 0.3f, 1f)))
ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.HeaderActive, new Vector4(0.25f, 0.22f, 0.3f, 1f), true);
try
{
Vector2 cursorPos = ImGui.GetCursorPos();
Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
@ -67,7 +75,19 @@ internal sealed class ChangelogEntryComponent
DrawDateWithIcon(text, dateSize, scaledIconFontSize, cursorScreenPos, cursorPos, x, verticalOffset, fontSize);
ImGui.SetCursorPos(cursorPos2);
}
finally
{
((IDisposable)val4)?.Dispose();
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
if (flag)
{
@ -78,11 +98,16 @@ internal sealed class ChangelogEntryComponent
private static void DrawVersionText(string versionText, Vector2 versionSize, Vector2 headerStartPos, float verticalOffset)
{
float x = headerStartPos.X + ImGui.GetStyle().FramePadding.X * 2f + 20f;
using (ImRaii.PushFont(UiBuilder.MonoFont))
FontDisposable val = ImRaii.PushFont(UiBuilder.MonoFont, true);
try
{
ImGui.SetCursorPos(new Vector2(x, headerStartPos.Y + verticalOffset));
ImGui.TextColored(new Vector4(0.95f, 0.95f, 0.95f, 1f), versionText);
}
finally
{
((IDisposable)val)?.Dispose();
}
}
private void DrawNewBadge(bool isNew, Vector2 headerStartScreenPos, float availableWidth)
@ -100,11 +125,16 @@ internal sealed class ChangelogEntryComponent
private static void DrawDateWithIcon(string dateText, Vector2 dateSize, float scaledIconFontSize, Vector2 headerStartScreenPos, Vector2 headerStartPos, float availableWidth, float verticalOffset, float defaultFontSize)
{
string text = FontAwesomeIcon.Calendar.ToIconString();
FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true);
Vector2 vector;
using (ImRaii.PushFont(UiBuilder.IconFont))
try
{
vector = ImGui.CalcTextSize(text);
}
finally
{
((IDisposable)val)?.Dispose();
}
float num = vector.X * (scaledIconFontSize / defaultFontSize);
float num2 = num + 4f + dateSize.X;
float num3 = availableWidth - num2 - 12f;

View file

@ -19,18 +19,33 @@ internal sealed class ChangelogFooterComponent
float num = 120f;
float num2 = (ImGui.GetContentRegionAvail().X - num) * 0.5f;
ImGui.SetCursorPosX(ImGui.GetCursorPosX() + num2);
using (ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.55f, 0.45f, 0.75f, 0.6f)))
ColorDisposable val = ImRaii.PushColor(ImGuiCol.Button, new Vector4(0.55f, 0.45f, 0.75f, 0.6f), true);
try
{
using (ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.65f, 0.55f, 0.85f, 0.8f)))
ColorDisposable val2 = ImRaii.PushColor(ImGuiCol.ButtonHovered, new Vector4(0.65f, 0.55f, 0.85f, 0.8f), true);
try
{
using (ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.75f, 0.55f, 0.95f, 1f)))
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.ButtonActive, new Vector4(0.75f, 0.55f, 0.95f, 1f), true);
try
{
if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.CheckCircle, "Got It!"))
{
onConfirm();
}
}
finally
{
((IDisposable)val3)?.Dispose();
}
}
finally
{
((IDisposable)val2)?.Dispose();
}
}
finally
{
((IDisposable)val)?.Dispose();
}
}
}

View file

@ -200,7 +200,8 @@ internal sealed class ChangelogHeaderComponent
{
float num = MathF.Sin(_animationTime * 2f) * 3f;
float num2 = MathF.Sin(_animationTime * 1.5f + (float)Math.PI / 2f) * 1.5f;
using (ImRaii.PushFont(UiBuilder.IconFont))
FontDisposable val = ImRaii.PushFont(UiBuilder.IconFont, true);
try
{
string text = FontAwesomeIcon.FileAlt.ToIconString();
ImGui.SetCursorPosX(centerX - ImGui.CalcTextSize(text).X * 0.5f + num2);
@ -213,6 +214,10 @@ internal sealed class ChangelogHeaderComponent
ImGui.TextColored(new Vector4(0.75f, 0.55f, 0.95f, 1f), text);
ImGui.PopStyleVar();
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.SetCursorPosY(ImGui.GetCursorPosY() - num + 4f);
}
@ -220,7 +225,8 @@ internal sealed class ChangelogHeaderComponent
{
float num = MathF.Max(0f, 1f - (_animationTime - 0.1f) * 3f);
float num2 = num * num * (3f - 2f * num) * 20f;
using (ImRaii.PushFont(UiBuilder.MonoFont))
FontDisposable val = ImRaii.PushFont(UiBuilder.MonoFont, true);
try
{
string text = "What's New in Questionable?";
ImGui.SetCursorPosX(centerX - ImGui.CalcTextSize(text).X * 0.5f - num2);
@ -228,6 +234,10 @@ internal sealed class ChangelogHeaderComponent
ImGui.TextColored(new Vector4(0.95f, 0.95f, 1f, 1f), text);
ImGui.PopStyleVar();
}
finally
{
((IDisposable)val)?.Dispose();
}
ImGui.SetCursorPosY(ImGui.GetCursorPosY() + 6f);
}