From 58850f453008c32d86209f01a294a1d0c12a5eaf Mon Sep 17 00:00:00 2001 From: CakeAndBanana Date: Thu, 9 Oct 2025 23:01:50 +0200 Subject: [PATCH 1/7] Changed /light lightfinder to /light finder --- LightlessSync/Services/CommandManagerService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LightlessSync/Services/CommandManagerService.cs b/LightlessSync/Services/CommandManagerService.cs index b2993d3..7aedc7b 100644 --- a/LightlessSync/Services/CommandManagerService.cs +++ b/LightlessSync/Services/CommandManagerService.cs @@ -43,7 +43,7 @@ public sealed class CommandManagerService : IDisposable "\t /light gpose - Opens the Lightless Character Data Hub window" + Environment.NewLine + "\t /light analyze - Opens the Lightless Character Data Analysis window" + Environment.NewLine + "\t /light settings - Opens the Lightless Settings window" + Environment.NewLine + - "\t /light lightfinder - Opens the Lightfinder window" + "\t /light finder - Opens the Lightfinder window" }); } @@ -123,7 +123,7 @@ public sealed class CommandManagerService : IDisposable { _mediator.Publish(new UiToggleMessage(typeof(SettingsUi))); } - else if (string.Equals(splitArgs[0], "lightfinder", StringComparison.OrdinalIgnoreCase)) + else if (string.Equals(splitArgs[0], "finder", StringComparison.OrdinalIgnoreCase)) { _mediator.Publish(new UiToggleMessage(typeof(BroadcastUI))); } From 23c56505aced02df02938964be942d08753f2cb3 Mon Sep 17 00:00:00 2001 From: CakeAndBanana Date: Thu, 9 Oct 2025 23:31:35 +0200 Subject: [PATCH 2/7] Added option to show --- .../Configurations/LightlessConfig.cs | 1 + LightlessSync/Services/NameplateHandler.cs | 2 +- LightlessSync/UI/SettingsUi.cs | 11 +++++++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/LightlessSync/LightlessConfiguration/Configurations/LightlessConfig.cs b/LightlessSync/LightlessConfiguration/Configurations/LightlessConfig.cs index c20d631..5ca2fc8 100644 --- a/LightlessSync/LightlessConfiguration/Configurations/LightlessConfig.cs +++ b/LightlessSync/LightlessConfiguration/Configurations/LightlessConfig.cs @@ -80,6 +80,7 @@ public class LightlessConfig : ILightlessConfiguration public bool LightfinderLabelUseIcon { get; set; } = false; public bool LightfinderLabelShowOwn { get; set; } = true; public bool LightfinderLabelShowPaired { get; set; } = true; + public bool LightfinderLabelShowHidden { get; set; } = false; public string LightfinderLabelIconGlyph { get; set; } = SeIconCharExtensions.ToIconString(SeIconChar.Hyadelyn); public float LightfinderLabelScale { get; set; } = 1.0f; public bool LightfinderAutoAlign { get; set; } = true; diff --git a/LightlessSync/Services/NameplateHandler.cs b/LightlessSync/Services/NameplateHandler.cs index 74edabc..5ff274a 100644 --- a/LightlessSync/Services/NameplateHandler.cs +++ b/LightlessSync/Services/NameplateHandler.cs @@ -247,7 +247,7 @@ public unsafe class NameplateHandler : IMediatorSubscriber var pNameplateIconNode = nameplateObject.MarkerIcon; var pNameplateResNode = nameplateObject.NameContainer; var pNameplateTextNode = nameplateObject.NameText; - bool IsVisible = pNameplateIconNode->AtkResNode.IsVisible() || (pNameplateResNode->IsVisible() && pNameplateTextNode->AtkResNode.IsVisible()); + bool IsVisible = pNameplateIconNode->AtkResNode.IsVisible() || (pNameplateResNode->IsVisible() && pNameplateTextNode->AtkResNode.IsVisible()) || _configService.Current.LightfinderLabelShowHidden; pNode->AtkResNode.ToggleVisibility(IsVisible); var nameContainer = nameplateObject.NameContainer; diff --git a/LightlessSync/UI/SettingsUi.cs b/LightlessSync/UI/SettingsUi.cs index 84e4e94..ac49986 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -1210,6 +1210,17 @@ public class SettingsUi : WindowMediatorSubscriberBase } _uiShared.DrawHelpText("Toggles paired player(s) Lightfinder label."); + var showHidden = _configService.Current.LightfinderLabelShowHidden; + if (ImGui.Checkbox("Show Lightfinder label when no nameplate(s) is visible", ref showHidden)) + { + _configService.Current.LightfinderLabelShowHidden = showHidden; + _configService.Save(); + _nameplateHandler.ClearNameplateCaches(); + _nameplateHandler.FlagRefresh(); + _nameplateService.RequestRedraw(); + } + _uiShared.DrawHelpText("Toggles paired player(s) Lightfinder label."); + _uiShared.ColoredSeparator(UIColors.Get("LightlessPurpleDefault"), 1.5f); ImGui.TextUnformatted("Label"); From ad29fa7b69f95e41d9f320a09feaa0f34c37af73 Mon Sep 17 00:00:00 2001 From: CakeAndBanana Date: Thu, 9 Oct 2025 23:31:45 +0200 Subject: [PATCH 3/7] Fixed label --- 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 ac49986..a5fc5cd 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -1219,7 +1219,7 @@ public class SettingsUi : WindowMediatorSubscriberBase _nameplateHandler.FlagRefresh(); _nameplateService.RequestRedraw(); } - _uiShared.DrawHelpText("Toggles paired player(s) Lightfinder label."); + _uiShared.DrawHelpText("Toggles Lightfinder label when no nameplate(s) is visible."); _uiShared.ColoredSeparator(UIColors.Get("LightlessPurpleDefault"), 1.5f); From b06ffb3341b8b43afc912b1ffc3dbc2842c137c0 Mon Sep 17 00:00:00 2001 From: defnotken Date: Thu, 9 Oct 2025 18:06:31 -0500 Subject: [PATCH 4/7] update submodule --- LightlessAPI | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LightlessAPI b/LightlessAPI index 6c542c0..44fbe10 160000 --- a/LightlessAPI +++ b/LightlessAPI @@ -1 +1 @@ -Subproject commit 6c542c0ccca0327896ef895f9de02a76869ea311 +Subproject commit 44fbe1045872fcae4df45e43625a9ff1a79bc2ef From 144ac166fb9c7d9a7a9934a4ceddf6355104d411 Mon Sep 17 00:00:00 2001 From: CakeAndBanana Date: Fri, 10 Oct 2025 15:50:22 +0200 Subject: [PATCH 5/7] Changed Discord URL --- 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 a5fc5cd..53a4ce9 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -2629,7 +2629,7 @@ public class SettingsUi : WindowMediatorSubscriberBase ImGui.SameLine(); if (ImGui.Button("Lightless Sync Discord")) { - Util.OpenLink("https://discord.gg/mpNdkrTRjW"); + Util.OpenLink("https://discord.gg/Lightless"); } ImGui.Separator(); if (ImGui.BeginTabBar("mainTabBar")) From 70c296a16b0ae87491cafc0ed2d7866b40346153 Mon Sep 17 00:00:00 2001 From: defnotken Date: Fri, 10 Oct 2025 16:26:36 -0500 Subject: [PATCH 6/7] Nameplate Fix + Text Handling --- LightlessSync/Services/NameplateHandler.cs | 50 +++++++++++----------- LightlessSync/UI/SettingsUi.cs | 4 +- 2 files changed, 29 insertions(+), 25 deletions(-) diff --git a/LightlessSync/Services/NameplateHandler.cs b/LightlessSync/Services/NameplateHandler.cs index 74edabc..7f0f315 100644 --- a/LightlessSync/Services/NameplateHandler.cs +++ b/LightlessSync/Services/NameplateHandler.cs @@ -360,33 +360,35 @@ public unsafe class NameplateHandler : IMediatorSubscriber } int positionX; + + if (!config.LightfinderLabelUseIcon && (string.IsNullOrWhiteSpace(labelContent) || string.Equals(labelContent, "-", StringComparison.Ordinal))) + labelContent = DefaultLabelText; + + pNode->FontType = config.LightfinderLabelUseIcon ? FontType.Axis : FontType.MiedingerMed; + + pNode->SetText(labelContent); + + if (!config.LightfinderLabelUseIcon) + { + pNode->TextFlags &= ~TextFlags.AutoAdjustNodeSize; + pNode->AtkResNode.Width = 0; + nodeWidth = (int)pNode->AtkResNode.GetWidth(); + if (nodeWidth <= 0) + nodeWidth = (int)System.Math.Round(AtkNodeHelpers.DefaultTextNodeWidth * effectiveScale); + pNode->AtkResNode.Width = (ushort)nodeWidth; + } + else + { + pNode->TextFlags |= TextFlags.AutoAdjustNodeSize; + pNode->AtkResNode.Width = 0; + nodeWidth = pNode->AtkResNode.GetWidth(); + } + + if (config.LightfinderAutoAlign && nameContainer != null && hasValidOffset) { var nameplateWidth = (int)nameContainer->Width; - if (!config.LightfinderLabelUseIcon) - { - pNode->TextFlags &= ~TextFlags.AutoAdjustNodeSize; - pNode->AtkResNode.Width = 0; - pNode->SetText(labelContent); - - nodeWidth = (int)pNode->AtkResNode.GetWidth(); - if (nodeWidth <= 0) - nodeWidth = (int)System.Math.Round(AtkNodeHelpers.DefaultTextNodeWidth * effectiveScale); - - if (nodeWidth > nameplateWidth) - nodeWidth = nameplateWidth; - - pNode->AtkResNode.Width = (ushort)nodeWidth; - } - else - { - pNode->TextFlags |= TextFlags.AutoAdjustNodeSize; - pNode->AtkResNode.Width = 0; - pNode->SetText(labelContent); - nodeWidth = (int)pNode->AtkResNode.GetWidth(); - } - int leftPos = nameplateWidth / 8; int rightPos = nameplateWidth - nodeWidth - (nameplateWidth / 8); int centrePos = (nameplateWidth - nodeWidth) / 2; @@ -414,7 +416,7 @@ public unsafe class NameplateHandler : IMediatorSubscriber positionX = 58 + config.LightfinderLabelOffsetX; alignment = AlignmentType.Bottom; } - + positionY += config.LightfinderLabelOffsetY; alignment = (AlignmentType)System.Math.Clamp((int)alignment, 0, 8); diff --git a/LightlessSync/UI/SettingsUi.cs b/LightlessSync/UI/SettingsUi.cs index 84e4e94..8a92b65 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -1254,7 +1254,8 @@ public class SettingsUi : WindowMediatorSubscriberBase var selected = i == _lightfinderIconPresetIndex; if (ImGui.Selectable(preview, selected)) { - ApplyLightfinderIcon(optionGlyph, i); + _lightfinderIconInput = NameplateHandler.ToIconEditorString(optionGlyph); + _lightfinderIconPresetIndex = i; } } @@ -2594,6 +2595,7 @@ public class SettingsUi : WindowMediatorSubscriberBase _lightfinderIconInput = NameplateHandler.ToIconEditorString(normalizedGlyph); _lightfinderIconPresetIndex = presetIndex; _lightfinderIconInputInitialized = true; + ImGui.SetKeyboardFocusHere(-1); } private void DrawSettingsContent() From 387e5ad51542c15c2684ebefe5bc3a16940f86b1 Mon Sep 17 00:00:00 2001 From: defnotken Date: Fri, 10 Oct 2025 16:27:40 -0500 Subject: [PATCH 7/7] oop --- LightlessSync/UI/SettingsUi.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/LightlessSync/UI/SettingsUi.cs b/LightlessSync/UI/SettingsUi.cs index 8a92b65..2589601 100644 --- a/LightlessSync/UI/SettingsUi.cs +++ b/LightlessSync/UI/SettingsUi.cs @@ -2595,7 +2595,6 @@ public class SettingsUi : WindowMediatorSubscriberBase _lightfinderIconInput = NameplateHandler.ToIconEditorString(normalizedGlyph); _lightfinderIconPresetIndex = presetIndex; _lightfinderIconInputInitialized = true; - ImGui.SetKeyboardFocusHere(-1); } private void DrawSettingsContent()