From 7c4269b0117e2654718af49b0f14b9c4d406ad78 Mon Sep 17 00:00:00 2001 From: defnotken Date: Sat, 27 Sep 2025 21:58:24 -0500 Subject: [PATCH 01/13] Testing dev release workflow --- .../workflows/lightless-tag-and-release.yml | 101 +++++++++++++++++- 1 file changed, 96 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/lightless-tag-and-release.yml b/.gitea/workflows/lightless-tag-and-release.yml index 63b4fb0..adf40b3 100644 --- a/.gitea/workflows/lightless-tag-and-release.yml +++ b/.gitea/workflows/lightless-tag-and-release.yml @@ -2,7 +2,7 @@ name: Tag and Release Lightless on: push: - branches: [ master ] + branches: [ master, dev ] env: PLUGIN_NAME: LightlessSync @@ -33,6 +33,11 @@ jobs: curl -O https://goatcorp.github.io/dalamud-distrib/stg/latest.zip unzip latest.zip -d /root/.xlcore/dalamud/Hooks/dev + - name: Checkout Dev branch (only for dev) + if: github.ref == 'refs/heads/dev' + run: | + git checkout dev + - name: Lets Build Lightless! run: | dotnet restore @@ -62,7 +67,8 @@ jobs: mkdir -p output (cd /workspace/Lightless-Sync/LightlessClient/LightlessSync/bin/x64/Release/ && zip -r $OLDPWD/output/LightlessClient.zip *) - - name: Create Git tag if not exists + - name: Create Git tag if not exists (master) + if: github.ref == 'refs/heads/master' run: | tag="${{ steps.package_version.outputs.version }}" git fetch --tags @@ -76,7 +82,23 @@ jobs: echo "Tag $tag already exists. Skipping tag creation." fi - - name: Create Release + - name: Create Git tag if not exists (dev) + if: github.ref == 'refs/heads/dev' + run: | + tag="${{ steps.package_version.outputs.version }}-Dev" + git fetch --tags + if ! git tag -l "$tag" | grep -q "$tag"; then + echo "Tag $tag does not exist. Creating and pushing..." + git config user.name "GitHub Action" + git config user.email "action@github.com" + git tag "$tag" + git push origin "$tag" + else + echo "Tag $tag already exists. Skipping tag creation." + fi + + - name: Create Release (master) + if: github.ref == 'refs/heads/master' id: create_release run: | echo "=== Searching for existing release ${{ steps.package_version.outputs.version }}===" @@ -107,6 +129,35 @@ jobs: release_id=$(echo "$response" | jq -r .id) echo "release_id=$release_id" >> "$GITHUB_OUTPUT" + - name: Create Release (dev) + if: github.ref == 'refs/heads/dev' + id: create_release + run: | + version="${{ steps.package_version.outputs.version }}-Dev" + echo "=== Searching for existing release $version===" + release_id=$(curl -s -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + "https://git.lightless-sync.org/api/v1/repos/${GITHUB_REPOSITORY}/releases/tags/$version" | jq -r .id) + if [ "$release_id" != "null" ]; then + echo "=== Deleting existing release $version===" + curl -X DELETE -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + "https://git.lightless-sync.org/api/v1/repos/${GITHUB_REPOSITORY}/releases/$release_id" + fi + echo "=== Creating new release $version===" + response=$( + curl --fail-with-body -X POST \ + -H "Content-Type: application/json" \ + -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + -d '{ + "tag_name": "'"$version"'", + "name": "'"$version"'", + "draft": false, + "prerelease": false + }' \ + "https://git.lightless-sync.org/api/v1/repos/${GITHUB_REPOSITORY}/releases" + ) + release_id=$(echo "$response" | jq -r .id) + echo "release_id=$release_id" >> "$GITHUB_OUTPUT" + - name: Upload Assets to release run: | curl --fail-with-body -s -X POST \ @@ -122,7 +173,8 @@ jobs: env: GIT_TERMINAL_PROMPT: 0 - - name: Update plogonmaster.json with version + - name: Update plogonmaster.json with version (master) + if: github.ref == 'refs/heads/master' env: VERSION: ${{ steps.package_version.outputs.version }} run: | @@ -159,7 +211,6 @@ jobs: .DalamudApiLevel = $dalamudApiLevel | .AssemblyVersion = $version | .DownloadLinkInstall = $downloadUrl - | .DownloadLinkTesting = $downloadUrl | .DownloadLinkUpdate = $downloadUrl else . @@ -172,6 +223,46 @@ jobs: # Output the content of the file cat "$repoJsonPath" + - name: Update plogonmaster.json with version (dev) + if: github.ref == 'refs/heads/dev' + env: + VERSION: ${{ steps.package_version.outputs.version }} + run: | + set -e + pluginJsonPath="${PLUGIN_NAME}/bin/x64/Release/${PLUGIN_NAME}.json" + repoJsonPath="LightlessSyncRepo/LightlessSync/plogonmaster.json" + assemblyVersion="${VERSION}" + version="${VERSION}-Dev" + downloadUrl="https://git.lightless-sync.org/${{ gitea.repository_owner }}/LightlessClient/releases/download/$version/LightlessClient.zip" + pluginJson=$(cat "$pluginJsonPath") + internalName=$(jq -r '.InternalName' <<< "$pluginJson") + dalamudApiLevel=$(jq -r '.DalamudApiLevel' <<< "$pluginJson") + repoJsonRaw=$(cat "$repoJsonPath") + if echo "$repoJsonRaw" | jq 'type' | grep -q '"array"'; then + repoJson="$repoJsonRaw" + else + repoJson="[$repoJsonRaw]" + fi + updatedRepoJson=$(jq \ + --arg internalName "$internalName" \ + --arg dalamudApiLevel "$dalamudApiLevel" \ + --arg version "$version" \ + --arg downloadUrl "$downloadUrl" \ + ' + map( + if .InternalName == $internalName + then + .DalamudApiLevel = $dalamudApiLevel + | .TestingAssemblyVersion = $assemblyVersion + | .DownloadLinkTesting = $downloadUrl + else + . + end + ) + ' <<< "$repoJson") + echo "$updatedRepoJson" > "$repoJsonPath" + cat "$repoJsonPath" + - name: Commit and push to LightlessSync run: | cd LightlessSyncRepo/LightlessSync From 73f130a95a3f6ea95b74d231257edf0c57a7e08b Mon Sep 17 00:00:00 2001 From: defnotken Date: Sat, 27 Sep 2025 22:05:33 -0500 Subject: [PATCH 02/13] remove redundant checkout --- .gitea/workflows/lightless-tag-and-release.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.gitea/workflows/lightless-tag-and-release.yml b/.gitea/workflows/lightless-tag-and-release.yml index adf40b3..d92764f 100644 --- a/.gitea/workflows/lightless-tag-and-release.yml +++ b/.gitea/workflows/lightless-tag-and-release.yml @@ -33,11 +33,6 @@ jobs: curl -O https://goatcorp.github.io/dalamud-distrib/stg/latest.zip unzip latest.zip -d /root/.xlcore/dalamud/Hooks/dev - - name: Checkout Dev branch (only for dev) - if: github.ref == 'refs/heads/dev' - run: | - git checkout dev - - name: Lets Build Lightless! run: | dotnet restore From 914553d5ab3d3208ee4a55f7d35060a6da46f972 Mon Sep 17 00:00:00 2001 From: defnotken Date: Sun, 28 Sep 2025 10:11:13 -0500 Subject: [PATCH 03/13] plogon missing var --- .gitea/workflows/lightless-tag-and-release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/lightless-tag-and-release.yml b/.gitea/workflows/lightless-tag-and-release.yml index d92764f..3401e21 100644 --- a/.gitea/workflows/lightless-tag-and-release.yml +++ b/.gitea/workflows/lightless-tag-and-release.yml @@ -241,6 +241,7 @@ jobs: updatedRepoJson=$(jq \ --arg internalName "$internalName" \ --arg dalamudApiLevel "$dalamudApiLevel" \ + --arg assemblyVersion "$assemblyVersion" \ --arg version "$version" \ --arg downloadUrl "$downloadUrl" \ ' From 068c8cb1807d5c26d6c1cdb9ad3da779b65e66a3 Mon Sep 17 00:00:00 2001 From: defnotken Date: Tue, 30 Sep 2025 09:52:12 -0500 Subject: [PATCH 04/13] Merge + Version Bump --- LightlessAPI | 2 +- LightlessSync/LightlessSync.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/LightlessAPI b/LightlessAPI index 5bfd21a..69f0e31 160000 --- a/LightlessAPI +++ b/LightlessAPI @@ -1 +1 @@ -Subproject commit 5bfd21aaa90817f14c9e2931e77b20f4276f16ed +Subproject commit 69f0e310bd78e0c56eab298199e6e2ca15bf56bd diff --git a/LightlessSync/LightlessSync.csproj b/LightlessSync/LightlessSync.csproj index 344e968..a9b387d 100644 --- a/LightlessSync/LightlessSync.csproj +++ b/LightlessSync/LightlessSync.csproj @@ -3,7 +3,7 @@ - 1.12.0 + 1.12.1 https://github.com/Light-Public-Syncshells/LightlessClient From f6e1832d62503cfa22613881af0b2e2f3745b9f5 Mon Sep 17 00:00:00 2001 From: defnotken Date: Wed, 1 Oct 2025 19:26:03 -0500 Subject: [PATCH 05/13] Bugfixes for lightfinder --- LightlessSync/LightlessSync.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LightlessSync/LightlessSync.csproj b/LightlessSync/LightlessSync.csproj index a9b387d..4bab148 100644 --- a/LightlessSync/LightlessSync.csproj +++ b/LightlessSync/LightlessSync.csproj @@ -3,7 +3,7 @@ - 1.12.1 + 1.12.2 https://github.com/Light-Public-Syncshells/LightlessClient From 05872c285cdda5512f649abdd5f36d1eb5d5152d Mon Sep 17 00:00:00 2001 From: defnotken Date: Thu, 2 Oct 2025 15:39:58 -0500 Subject: [PATCH 06/13] more fixes --- LightlessSync/LightlessSync.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LightlessSync/LightlessSync.csproj b/LightlessSync/LightlessSync.csproj index 4bab148..5b31c88 100644 --- a/LightlessSync/LightlessSync.csproj +++ b/LightlessSync/LightlessSync.csproj @@ -3,7 +3,7 @@ - 1.12.2 + 1.12.3 https://github.com/Light-Public-Syncshells/LightlessClient From 4862921b039f0acb754b4097bafae96569d4567f Mon Sep 17 00:00:00 2001 From: choco Date: Fri, 3 Oct 2025 09:50:37 +0200 Subject: [PATCH 07/13] table layout for color settings --- LightlessSync/UI/SettingsUi.cs | 75 ++++++++++++++++++++++------------ 1 file changed, 48 insertions(+), 27 deletions(-) diff --git a/LightlessSync/UI/SettingsUi.cs b/LightlessSync/UI/SettingsUi.cs index 2047fa0..95292de 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -978,45 +978,66 @@ public class SettingsUi : WindowMediatorSubscriberBase var colorNames = new[] { - ("LightlessPurple", "Lightless Purple", "Primary colors"), - ("LightlessPurpleActive", "Lightless Purple Active", "Primary colors"), - ("LightlessPurpleDefault", "Lightless Purple Inactive", "Primary colors"), - ("LightlessBlue", "Lightless Blue", "Secondary colors"), + ("LightlessPurple", "Lightless Purple", "Section titles and dividers"), + ("LightlessPurpleActive", "Lightless Purple Active", "Active tabs and hover highlights"), + ("LightlessPurpleDefault", "Lightless Purple Inactive", "Inactive tabs and default dividers"), + ("LightlessBlue", "Lightless Blue", "On/true toggles and 'Upload complete' status"), - ("LightlessGreen", "Lightless Green", "Active elements"), + ("LightlessGreen", "Lightless Green", "Join buttons and success messages"), ("LightlessYellow", "Lightless Yellow", "Warning colors"), ("LightlessYellow2", "Lightless Yellow 2", "Warning colors"), - ("PairBlue", "Pair Blue", "Pair UI elements"), + ("PairBlue", "Pair Blue", "Syncshell headers, toggle highlights, and moderator actions"), - ("DimRed", "Dim Red", "Error and offline") + ("DimRed", "Dim Red", "Error and offline colors") }; - - foreach (var (colorKey, displayName, description) in colorNames) + if (ImGui.BeginTable("##ColorTable", 3, ImGuiTableFlags.Borders | ImGuiTableFlags.RowBg | ImGuiTableFlags.SizingFixedFit)) { - var currentColor = UIColors.Get(colorKey); - var colorToEdit = currentColor; + ImGui.TableSetupColumn("Color", ImGuiTableColumnFlags.WidthStretch); + ImGui.TableSetupColumn("Description", ImGuiTableColumnFlags.WidthStretch); + ImGui.TableSetupColumn("Reset", ImGuiTableColumnFlags.WidthFixed, 40); + ImGui.TableHeadersRow(); - ImGui.AlignTextToFramePadding(); - - if (ImGui.ColorEdit4($"##color_{colorKey}", ref colorToEdit, ImGuiColorEditFlags.NoInputs | ImGuiColorEditFlags.AlphaPreviewHalf)) + foreach (var (colorKey, displayName, description) in colorNames) { - UIColors.Set(colorKey, colorToEdit); - } - - ImGui.SameLine(); - ImGui.TextUnformatted($"{displayName} - {description}"); - - if (UIColors.IsCustom(colorKey)) - { - ImGui.SameLine(); - if (_uiShared.IconTextButton(FontAwesomeIcon.Undo, $"Reset {colorKey}")) + ImGui.TableNextRow(); + + // olor column + ImGui.TableSetColumnIndex(0); + var currentColor = UIColors.Get(colorKey); + var colorToEdit = currentColor; + if (ImGui.ColorEdit4($"##color_{colorKey}", ref colorToEdit, ImGuiColorEditFlags.NoInputs | ImGuiColorEditFlags.AlphaPreviewHalf)) { - UIColors.Reset(colorKey); + UIColors.Set(colorKey, colorToEdit); + } + ImGui.SameLine(); + ImGui.AlignTextToFramePadding(); + ImGui.TextUnformatted(displayName); + + // description column + ImGui.TableSetColumnIndex(1); + ImGui.AlignTextToFramePadding(); + ImGui.TextUnformatted(description); + + // actions column + ImGui.TableSetColumnIndex(2); + if (UIColors.IsCustom(colorKey)) + { + using var resetId = ImRaii.PushId($"Reset_{colorKey}"); + var availableWidth = ImGui.GetContentRegionAvail().X; + using (ImRaii.PushFont(UiBuilder.IconFont)) + { + if (ImGui.Button(FontAwesomeIcon.Undo.ToIconString(), new Vector2(availableWidth, 0))) + { + UIColors.Reset(colorKey); + } + } + UiSharedService.AttachToolTip("Reset this color to default"); } - UiSharedService.AttachToolTip("Reset this color to default"); } + + ImGui.EndTable(); } ImGui.Spacing(); @@ -2263,4 +2284,4 @@ public class SettingsUi : WindowMediatorSubscriberBase _wasOpen = IsOpen; IsOpen = false; } -} \ No newline at end of file +} From e8a3d87ff05122ae79ccf9abc9e5cc34e9641dbb Mon Sep 17 00:00:00 2001 From: choco Date: Fri, 3 Oct 2025 09:53:46 +0200 Subject: [PATCH 08/13] renamed color variables --- LightlessSync/UI/SettingsUi.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/LightlessSync/UI/SettingsUi.cs b/LightlessSync/UI/SettingsUi.cs index 95292de..e2a218f 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -1,4 +1,4 @@ -using Dalamud.Bindings.ImGui; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; @@ -978,19 +978,19 @@ public class SettingsUi : WindowMediatorSubscriberBase var colorNames = new[] { - ("LightlessPurple", "Lightless Purple", "Section titles and dividers"), - ("LightlessPurpleActive", "Lightless Purple Active", "Active tabs and hover highlights"), - ("LightlessPurpleDefault", "Lightless Purple Inactive", "Inactive tabs and default dividers"), - ("LightlessBlue", "Lightless Blue", "On/true toggles and 'Upload complete' status"), + ("LightlessPurple", "Accent Purple", "Section titles and dividers"), + ("LightlessPurpleActive", "Accent Purple (Active)", "Active tabs and hover highlights"), + ("LightlessPurpleDefault", "Accent Purple (Inactive)", "Inactive tabs and default dividers"), + ("LightlessBlue", "Status Blue", "On/true toggles and 'Upload complete' status"), - ("LightlessGreen", "Lightless Green", "Join buttons and success messages"), + ("LightlessGreen", "Success Green", "Join buttons and success messages"), - ("LightlessYellow", "Lightless Yellow", "Warning colors"), - ("LightlessYellow2", "Lightless Yellow 2", "Warning colors"), + ("LightlessYellow", "Warning Yellow", "Warning colors"), + ("LightlessYellow2", "Warning Yellow (Alt)", "Warning colors"), - ("PairBlue", "Pair Blue", "Syncshell headers, toggle highlights, and moderator actions"), + ("PairBlue", "Syncshell Blue", "Syncshell headers, toggle highlights, and moderator actions"), - ("DimRed", "Dim Red", "Error and offline colors") + ("DimRed", "Error Red", "Error and offline colors") }; if (ImGui.BeginTable("##ColorTable", 3, ImGuiTableFlags.Borders | ImGuiTableFlags.RowBg | ImGuiTableFlags.SizingFixedFit)) { @@ -1003,7 +1003,7 @@ public class SettingsUi : WindowMediatorSubscriberBase { ImGui.TableNextRow(); - // olor column + // color column ImGui.TableSetColumnIndex(0); var currentColor = UIColors.Get(colorKey); var colorToEdit = currentColor; From 9242f23787db8e290b18de05de8c51c3e6692d5a Mon Sep 17 00:00:00 2001 From: choco Date: Fri, 3 Oct 2025 09:55:54 +0200 Subject: [PATCH 09/13] color reset button always shown, but disabled if no custom value --- LightlessSync/UI/SettingsUi.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/LightlessSync/UI/SettingsUi.cs b/LightlessSync/UI/SettingsUi.cs index e2a218f..ce2b230 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -1022,10 +1022,12 @@ public class SettingsUi : WindowMediatorSubscriberBase // actions column ImGui.TableSetColumnIndex(2); - if (UIColors.IsCustom(colorKey)) + using var resetId = ImRaii.PushId($"Reset_{colorKey}"); + var availableWidth = ImGui.GetContentRegionAvail().X; + var isCustom = UIColors.IsCustom(colorKey); + + using (ImRaii.Disabled(!isCustom)) { - using var resetId = ImRaii.PushId($"Reset_{colorKey}"); - var availableWidth = ImGui.GetContentRegionAvail().X; using (ImRaii.PushFont(UiBuilder.IconFont)) { if (ImGui.Button(FontAwesomeIcon.Undo.ToIconString(), new Vector2(availableWidth, 0))) @@ -1033,8 +1035,8 @@ public class SettingsUi : WindowMediatorSubscriberBase UIColors.Reset(colorKey); } } - UiSharedService.AttachToolTip("Reset this color to default"); } + UiSharedService.AttachToolTip(isCustom ? "Reset this color to default" : "Color is already at default value"); } ImGui.EndTable(); From 012547056a6f2ffb11f8a7e2d65037de9b244dd1 Mon Sep 17 00:00:00 2001 From: choco Date: Fri, 3 Oct 2025 09:58:58 +0200 Subject: [PATCH 10/13] better column alignment --- LightlessSync/UI/SettingsUi.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LightlessSync/UI/SettingsUi.cs b/LightlessSync/UI/SettingsUi.cs index ce2b230..a4e450a 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -1,4 +1,4 @@ -using Dalamud.Bindings.ImGui; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; @@ -994,7 +994,7 @@ public class SettingsUi : WindowMediatorSubscriberBase }; if (ImGui.BeginTable("##ColorTable", 3, ImGuiTableFlags.Borders | ImGuiTableFlags.RowBg | ImGuiTableFlags.SizingFixedFit)) { - ImGui.TableSetupColumn("Color", ImGuiTableColumnFlags.WidthStretch); + ImGui.TableSetupColumn("Color", ImGuiTableColumnFlags.WidthFixed); ImGui.TableSetupColumn("Description", ImGuiTableColumnFlags.WidthStretch); ImGui.TableSetupColumn("Reset", ImGuiTableColumnFlags.WidthFixed, 40); ImGui.TableHeadersRow(); From 36bf17aee29af70756bff1fdbabe9c7af73c22b9 Mon Sep 17 00:00:00 2001 From: choco Date: Fri, 3 Oct 2025 10:03:09 +0200 Subject: [PATCH 11/13] rename accent purple labels to primary purple --- LightlessSync/UI/SettingsUi.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LightlessSync/UI/SettingsUi.cs b/LightlessSync/UI/SettingsUi.cs index a4e450a..9cc1114 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -978,9 +978,9 @@ public class SettingsUi : WindowMediatorSubscriberBase var colorNames = new[] { - ("LightlessPurple", "Accent Purple", "Section titles and dividers"), - ("LightlessPurpleActive", "Accent Purple (Active)", "Active tabs and hover highlights"), - ("LightlessPurpleDefault", "Accent Purple (Inactive)", "Inactive tabs and default dividers"), + ("LightlessPurple", "Primary Purple", "Section titles and dividers"), + ("LightlessPurpleActive", "Primary Purple (Active)", "Active tabs and hover highlights"), + ("LightlessPurpleDefault", "Primary Purple (Inactive)", "Inactive tabs and default dividers"), ("LightlessBlue", "Status Blue", "On/true toggles and 'Upload complete' status"), ("LightlessGreen", "Success Green", "Join buttons and success messages"), From 931009607b0ee4e36f8cb3e886958ff6b87f3c06 Mon Sep 17 00:00:00 2001 From: choco Date: Fri, 3 Oct 2025 10:33:36 +0200 Subject: [PATCH 12/13] color key name change --- LightlessSync/UI/SettingsUi.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LightlessSync/UI/SettingsUi.cs b/LightlessSync/UI/SettingsUi.cs index 9cc1114..231294e 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -981,7 +981,7 @@ public class SettingsUi : WindowMediatorSubscriberBase ("LightlessPurple", "Primary Purple", "Section titles and dividers"), ("LightlessPurpleActive", "Primary Purple (Active)", "Active tabs and hover highlights"), ("LightlessPurpleDefault", "Primary Purple (Inactive)", "Inactive tabs and default dividers"), - ("LightlessBlue", "Status Blue", "On/true toggles and 'Upload complete' status"), + ("LightlessBlue", "Secondary Blue", "Secondary title colors, visable pairs"), ("LightlessGreen", "Success Green", "Join buttons and success messages"), From 3d2650cc5fba0c24d2def34bbb735285546dd221 Mon Sep 17 00:00:00 2001 From: choco Date: Fri, 3 Oct 2025 16:11:09 +0200 Subject: [PATCH 13/13] added FC tag color override option for player nameplates --- .../Configurations/LightlessConfig.cs | 1 + LightlessSync/Services/NameplateService.cs | 10 +++++++--- LightlessSync/UI/SettingsUi.cs | 9 ++++++++- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/LightlessSync/LightlessConfiguration/Configurations/LightlessConfig.cs b/LightlessSync/LightlessConfiguration/Configurations/LightlessConfig.cs index 7194c60..6703f1c 100644 --- a/LightlessSync/LightlessConfiguration/Configurations/LightlessConfig.cs +++ b/LightlessSync/LightlessConfiguration/Configurations/LightlessConfig.cs @@ -67,6 +67,7 @@ public class LightlessConfig : ILightlessConfiguration public bool UseFocusTarget { get; set; } = false; public bool overrideFriendColor { get; set; } = false; public bool overridePartyColor { get; set; } = false; + public bool overrideFcTagColor { get; set; } = false; public bool useColoredUIDs { get; set; } = true; public bool BroadcastEnabled { get; set; } = false; public DateTime BroadcastTtl { get; set; } = DateTime.MinValue; diff --git a/LightlessSync/Services/NameplateService.cs b/LightlessSync/Services/NameplateService.cs index 6a94a53..27fa06f 100644 --- a/LightlessSync/Services/NameplateService.cs +++ b/LightlessSync/Services/NameplateService.cs @@ -1,4 +1,4 @@ -using Dalamud.Game.ClientState.Objects.Enums; +using Dalamud.Game.ClientState.Objects.Enums; using Dalamud.Game.Gui.NamePlate; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Plugin.Services; @@ -68,10 +68,14 @@ public class NameplateService : DisposableMediatorSubscriberBase (isFriend && !friendColorAllowed) )) { - //_logger.LogInformation("added nameplate color to {Name}", playerCharacter.Name.TextValue); handler.NameParts.TextWrap = CreateTextWrap(colors); - } + if (_configService.Current.overrideFcTagColor) + { + handler.FreeCompanyTagParts.OuterWrap = CreateTextWrap(colors); + handler.FreeCompanyTagParts.TextWrap = CreateTextWrap(colors); + } + } } } diff --git a/LightlessSync/UI/SettingsUi.cs b/LightlessSync/UI/SettingsUi.cs index 231294e..cb34877 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -1,4 +1,4 @@ -using Dalamud.Bindings.ImGui; +using Dalamud.Bindings.ImGui; using Dalamud.Interface; using Dalamud.Interface.Colors; using Dalamud.Interface.Utility; @@ -1096,6 +1096,7 @@ public class SettingsUi : WindowMediatorSubscriberBase var nameColors = _configService.Current.NameplateColors; var isFriendOverride = _configService.Current.overrideFriendColor; var isPartyOverride = _configService.Current.overridePartyColor; + var isFcTagOverride = _configService.Current.overrideFcTagColor; if (ImGui.Checkbox("Override name color of visible paired players", ref nameColorsEnabled)) { @@ -1126,6 +1127,12 @@ public class SettingsUi : WindowMediatorSubscriberBase _configService.Save(); _nameplateService.RequestRedraw(); } + if (ImGui.Checkbox("Override FC tag color", ref isFcTagOverride)) + { + _configService.Current.overrideFcTagColor = isFcTagOverride; + _configService.Save(); + _nameplateService.RequestRedraw(); + } } ImGui.Spacing();