added FC tag color override option for player nameplates

This commit is contained in:
choco
2025-10-03 16:11:09 +02:00
parent 931009607b
commit 3d2650cc5f
3 changed files with 16 additions and 4 deletions

View File

@@ -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;

View File

@@ -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);
}
}
}
}

View File

@@ -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();