forked from aly/qstbak
muffin v7.5.1
This commit is contained in:
parent
a6481e7b9a
commit
965a736f84
59 changed files with 4112 additions and 5059 deletions
|
|
@ -37,28 +37,20 @@ 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;
|
||||
try
|
||||
using (ImRaii.PushFont(UiBuilder.MonoFont))
|
||||
{
|
||||
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;
|
||||
try
|
||||
using (ImRaii.PushColor(ImGuiCol.Header, new Vector4(0.2f, 0.18f, 0.25f, 0.6f)))
|
||||
{
|
||||
ColorDisposable val3 = ImRaii.PushColor(ImGuiCol.HeaderHovered, new Vector4(0.3f, 0.25f, 0.35f, 0.8f), true);
|
||||
try
|
||||
using (ImRaii.PushColor(ImGuiCol.HeaderHovered, new Vector4(0.3f, 0.25f, 0.35f, 0.8f)))
|
||||
{
|
||||
ColorDisposable val4 = ImRaii.PushColor(ImGuiCol.HeaderActive, new Vector4(0.25f, 0.22f, 0.3f, 1f), true);
|
||||
try
|
||||
using (ImRaii.PushColor(ImGuiCol.HeaderActive, new Vector4(0.25f, 0.22f, 0.3f, 1f)))
|
||||
{
|
||||
Vector2 cursorPos = ImGui.GetCursorPos();
|
||||
Vector2 cursorScreenPos = ImGui.GetCursorScreenPos();
|
||||
|
|
@ -75,19 +67,7 @@ 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)
|
||||
{
|
||||
|
|
@ -98,16 +78,11 @@ 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;
|
||||
FontDisposable val = ImRaii.PushFont(UiBuilder.MonoFont, true);
|
||||
try
|
||||
using (ImRaii.PushFont(UiBuilder.MonoFont))
|
||||
{
|
||||
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)
|
||||
|
|
@ -125,16 +100,11 @@ 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;
|
||||
try
|
||||
using (ImRaii.PushFont(UiBuilder.IconFont))
|
||||
{
|
||||
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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue