credits integration into the yaml and ui

This commit is contained in:
choco
2025-10-16 14:35:30 +02:00
parent f77d109d00
commit 92b8d4a1cd
3 changed files with 137 additions and 2 deletions

View File

@@ -171,4 +171,40 @@ changelog:
- "Fixed owners being visible in moderator list view."
- "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."
- "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"

View File

@@ -5,6 +5,7 @@ namespace LightlessSync.UI.Models
public string Tagline { get; init; } = string.Empty;
public string Subline { get; init; } = string.Empty;
public List<ChangelogEntry> Changelog { get; init; } = new();
public List<CreditCategory>? Credits { get; init; }
}
public class ChangelogEntry
@@ -22,4 +23,16 @@ namespace LightlessSync.UI.Models
public string Number { get; init; } = string.Empty;
public List<string> Items { get; init; } = new();
}
public class CreditCategory
{
public string Category { get; init; } = string.Empty;
public List<CreditItem> Items { get; init; } = new();
}
public class CreditItem
{
public string Name { get; init; } = string.Empty;
public string Role { get; init; } = string.Empty;
}
}

View File

@@ -93,7 +93,7 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
DrawHeader();
ImGuiHelpers.ScaledDummy(6);
DrawChangelog();
DrawTabs();
DrawCloseButton();
}
@@ -480,6 +480,92 @@ public class UpdateNotesUi : WindowMediatorSubscriberBase
}
private void DrawTabs()
{
using (ImRaii.PushStyle(ImGuiStyleVar.FrameRounding, 6f))
using (ImRaii.PushColor(ImGuiCol.Tab, UIColors.Get("ButtonDefault")))
using (ImRaii.PushColor(ImGuiCol.TabHovered, UIColors.Get("LightlessPurple")))
using (ImRaii.PushColor(ImGuiCol.TabActive, UIColors.Get("LightlessPurpleActive")))
{
using (var tabBar = ImRaii.TabBar("###ll_tabs", ImGuiTabBarFlags.None))
{
if (!tabBar)
return;
using (var changelogTab = ImRaii.TabItem("What's New"))
{
if (changelogTab)
{
_selectedTab = 0;
DrawChangelog();
}
}
if (_changelog.Credits != null && _changelog.Credits.Count > 0)
{
using (var creditsTab = ImRaii.TabItem("Credits"))
{
if (creditsTab)
{
_selectedTab = 1;
DrawCredits();
}
}
}
}
}
}
private void DrawCredits()
{
using (ImRaii.PushStyle(ImGuiStyleVar.ChildRounding, 6f))
using (var child = ImRaii.Child("###ll_credits", new Vector2(0, ImGui.GetContentRegionAvail().Y - 60), false,
ImGuiWindowFlags.AlwaysVerticalScrollbar))
{
if (!child)
return;
ImGui.PushTextWrapPos();
if (_changelog.Credits != null)
{
foreach (var category in _changelog.Credits)
{
DrawCreditCategory(category);
ImGuiHelpers.ScaledDummy(10);
}
}
ImGui.PopTextWrapPos();
ImGui.Spacing();
}
}
private void DrawCreditCategory(CreditCategory category)
{
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}");
}
ImGuiHelpers.ScaledDummy(3);
}
ImGui.Unindent(15f);
}
private void DrawCloseButton()
{
ImGuiHelpers.ScaledDummy(5);