diff --git a/LightlessSync/UI/Changelog/changelog.yaml b/LightlessSync/Changelog/changelog.yaml similarity index 84% rename from LightlessSync/UI/Changelog/changelog.yaml rename to LightlessSync/Changelog/changelog.yaml index a2af1f1..98134a1 100644 --- a/LightlessSync/UI/Changelog/changelog.yaml +++ b/LightlessSync/Changelog/changelog.yaml @@ -161,7 +161,6 @@ changelog: - "Right-click on Server Top Bar button to disconnect from Lightless." - "Shift+Left click on Server Top Bar button to open settings." - "Added colors section in settings to change accent colors." - - "Added pin option from Dalamud in the UI." - "Ability to pause syncing while in Instance/Duty." - "Functionality to create syncshell folders." - "Added self-threshold warning." @@ -172,39 +171,4 @@ changelog: - "Removed Pin/Remove/Ban buttons on Owners when viewing as moderator." - "Fixed nameplate bug in PvP." - "Added 1 or 3 day options for inactive check." - -credits: - - category: "Development Team" - items: - - name: "Choco" - role: "Cringe Developer" - - name: "Additional Contributors" - role: "Community Contributors & Bug Reporters" - - - category: "Plugin Integration & IPC Support" - items: - - name: "Penumbra Team" - role: "Mod framework integration" - - name: "Glamourer Team" - role: "Customization system integration" - - name: "Customize+ Team" - role: "Body scaling integration" - - name: "Simple Heels Team" - role: "Height offset integration" - - name: "Honorific Team" - role: "Title system integration" - - name: "Moodles Team" - role: "Status effect integration" - - name: "PetNicknames Team" - role: "Pet naming integration" - - name: "Brio Team" - role: "GPose enhancement integration" - - - category: "Special Thanks" - items: - - name: "Dalamud & XIVLauncher Teams" - role: "Plugin framework and infrastructure" - - name: "Community Supporters" - role: "Testing, feedback, and financial support" - - name: "Beta Testers" - role: "Early testing and bug reporting" \ No newline at end of file + - "Fixed bug where some users could not see their own syncshell folders." \ No newline at end of file diff --git a/LightlessSync/Changelog/credits.yaml b/LightlessSync/Changelog/credits.yaml new file mode 100644 index 0000000..b3b3e8c --- /dev/null +++ b/LightlessSync/Changelog/credits.yaml @@ -0,0 +1,35 @@ +credits: + - category: "Development Team" + items: + - name: "Choco" + role: "Cringe Developer" + - name: "Additional Contributors" + role: "Community Contributors & Bug Reporters" + + - category: "Plugin Integration & IPC Support" + items: + - name: "Penumbra Team" + role: "Mod framework integration" + - name: "Glamourer Team" + role: "Customization system integration" + - name: "Customize+ Team" + role: "Body scaling integration" + - name: "Simple Heels Team" + role: "Height offset integration" + - name: "Honorific Team" + role: "Title system integration" + - name: "Moodles Team" + role: "Status effect integration" + - name: "PetNicknames Team" + role: "Pet naming integration" + - name: "Brio Team" + role: "GPose enhancement integration" + + - category: "Special Thanks" + items: + - name: "Dalamud & XIVLauncher Teams" + role: "Plugin framework and infrastructure" + - name: "Community Supporters" + role: "Testing, feedback, and financial support" + - name: "Beta Testers" + role: "Early testing and bug reporting" diff --git a/LightlessSync/LightlessSync.csproj b/LightlessSync/LightlessSync.csproj index daf6cfd..b4b5288 100644 --- a/LightlessSync/LightlessSync.csproj +++ b/LightlessSync/LightlessSync.csproj @@ -65,7 +65,8 @@ PreserveNewest - + + diff --git a/LightlessSync/UI/Models/Changelog.cs b/LightlessSync/UI/Models/Changelog.cs index bf1a474..23d26c4 100644 --- a/LightlessSync/UI/Models/Changelog.cs +++ b/LightlessSync/UI/Models/Changelog.cs @@ -35,4 +35,9 @@ namespace LightlessSync.UI.Models public string Name { get; init; } = string.Empty; public string Role { get; init; } = string.Empty; } + + public class CreditsFile + { + public List Credits { get; init; } = new(); + } } \ No newline at end of file diff --git a/LightlessSync/UI/UpdateNotesUi.cs b/LightlessSync/UI/UpdateNotesUi.cs index 8345987..f25c38a 100644 --- a/LightlessSync/UI/UpdateNotesUi.cs +++ b/LightlessSync/UI/UpdateNotesUi.cs @@ -22,6 +22,7 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase private readonly UiSharedService _uiShared; private ChangelogFile _changelog = new(); + private CreditsFile _credits = new(); private bool _scrollToTop; private int _selectedTab; @@ -492,7 +493,7 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase if (!tabBar) return; - using (var changelogTab = ImRaii.TabItem("What's New")) + using (var changelogTab = ImRaii.TabItem("Changelog")) { if (changelogTab) { @@ -501,7 +502,7 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase } } - if (_changelog.Credits != null && _changelog.Credits.Count > 0) + if (_credits.Credits != null && _credits.Credits.Count > 0) { using (var creditsTab = ImRaii.TabItem("Credits")) { @@ -527,9 +528,9 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase ImGui.PushTextWrapPos(); - if (_changelog.Credits != null) + if (_credits.Credits != null) { - foreach (var category in _changelog.Credits) + foreach (var category in _credits.Credits) { DrawCreditCategory(category); ImGuiHelpers.ScaledDummy(10); @@ -545,25 +546,19 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase { DrawFeatureSection(category.Category, UIColors.Get("LightlessBlue")); - ImGui.Indent(15f); - foreach (var item in category.Items) { - using (ImRaii.PushColor(ImGuiCol.Text, new Vector4(0.95f, 0.95f, 1.0f, 1.0f))) - { - ImGui.TextWrapped($"• {item.Name}"); - } - if (!string.IsNullOrEmpty(item.Role)) { - ImGui.SameLine(); - ImGui.TextColored(new Vector4(0.7f, 0.7f, 0.8f, 1.0f), $" — {item.Role}"); + ImGui.BulletText($"{item.Name} — {item.Role}"); + } + else + { + ImGui.BulletText(item.Name); } - - ImGuiHelpers.ScaledDummy(3); } - ImGui.Unindent(15f); + ImGuiHelpers.ScaledDummy(5); } private void DrawCloseButton() @@ -604,7 +599,9 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase ImGui.PushTextWrapPos(); foreach (var entry in _changelog.Changelog) + { DrawChangelogEntry(entry); + } ImGui.PopTextWrapPos(); ImGui.Spacing(); @@ -617,7 +614,6 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase ? UIColors.Get("LightlessGreen") : new Vector4(0.95f, 0.95f, 1.0f, 1.0f); - bool isOpen; var flags = entry.IsCurrent == true ? ImGuiTreeNodeFlags.DefaultOpen : ImGuiTreeNodeFlags.None; @@ -628,15 +624,15 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase using (ImRaii.PushColor(ImGuiCol.HeaderActive, UIColors.Get("LightlessPurpleActive"))) using (ImRaii.PushColor(ImGuiCol.Text, currentColor)) { - isOpen = ImGui.CollapsingHeader($" {entry.Name} — {entry.Date} ", flags); + var isOpen = ImGui.CollapsingHeader($" {entry.Name} — {entry.Date} ", flags); + + ImGui.SameLine(); + ImGui.TextColored(new Vector4(0.85f, 0.85f, 0.95f, 1.0f), $" — {entry.Tagline}"); + + if (!isOpen) + return; } - ImGui.SameLine(); - ImGui.TextColored(new Vector4(0.85f, 0.85f, 0.95f, 1.0f), $" — {entry.Tagline}"); - - if (!isOpen) - return; - ImGuiHelpers.ScaledDummy(8); if (!string.IsNullOrEmpty(entry.Message)) @@ -660,8 +656,6 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase ImGuiHelpers.ScaledDummy(5); } } - - ImGuiHelpers.ScaledDummy(8); } private static void DrawFeatureSection(string title, Vector4 accentColor) @@ -693,10 +687,15 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase 1.5f ); + // Calculate vertical centering + var textSize = ImGui.CalcTextSize(title); + var boxHeight = backgroundMax.Y - backgroundMin.Y; + var verticalOffset = (boxHeight - textSize.Y) / 5f; + ImGui.SetCursorPosX(ImGui.GetCursorPosX() + 8); - ImGui.Spacing(); + ImGui.SetCursorPosY(ImGui.GetCursorPosY() + verticalOffset); ImGui.TextColored(accentColor, title); - ImGui.Spacing(); + ImGui.SetCursorPosY(backgroundMax.Y - startPos.Y + ImGui.GetCursorPosY()); } private void LoadEmbeddedResources() @@ -704,17 +703,28 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase try { var assembly = Assembly.GetExecutingAssembly(); - using var changelogStream = assembly.GetManifestResourceStream("LightlessSync.UI.Changelog.changelog.yaml"); + var deserializer = new DeserializerBuilder() + .WithNamingConvention(CamelCaseNamingConvention.Instance) + .IgnoreUnmatchedProperties() + .Build(); + + // Load changelog + using var changelogStream = assembly.GetManifestResourceStream("LightlessSync.Changelog.changelog.yaml"); if (changelogStream != null) { using var reader = new StreamReader(changelogStream, Encoding.UTF8, true, 128); var yaml = reader.ReadToEnd(); - var deserializer = new DeserializerBuilder() - .WithNamingConvention(CamelCaseNamingConvention.Instance) - .IgnoreUnmatchedProperties() - .Build(); _changelog = deserializer.Deserialize(yaml) ?? new(); } + + // Load credits + using var creditsStream = assembly.GetManifestResourceStream("LightlessSync.Changelog.credits.yaml"); + if (creditsStream != null) + { + using var reader = new StreamReader(creditsStream, Encoding.UTF8, true, 128); + var yaml = reader.ReadToEnd(); + _credits = deserializer.Deserialize(yaml) ?? new(); + } } catch {