diff --git a/MareSynchronos/MareConfiguration/Configurations/MareConfig.cs b/MareSynchronos/MareConfiguration/Configurations/MareConfig.cs index 168ad78..2c5ab9a 100644 --- a/MareSynchronos/MareConfiguration/Configurations/MareConfig.cs +++ b/MareSynchronos/MareConfiguration/Configurations/MareConfig.cs @@ -10,6 +10,8 @@ public class MareConfig : IMareConfiguration public string CacheFolder { get; set; } = string.Empty; public bool DisableOptionalPluginWarnings { get; set; } = false; public bool EnableDtrEntry { get; set; } = false; + public bool ShowUidInDtrTooltip { get; set; } = true; + public bool PreferNoteInDtrTooltip { get; set; } = false; public bool EnableRightClickMenus { get; set; } = true; public NotificationLocation ErrorNotification { get; set; } = NotificationLocation.Both; public string ExportFolder { get; set; } = string.Empty; diff --git a/MareSynchronos/UI/DtrEntry.cs b/MareSynchronos/UI/DtrEntry.cs index 4cb46bf..18ca0ba 100644 --- a/MareSynchronos/UI/DtrEntry.cs +++ b/MareSynchronos/UI/DtrEntry.cs @@ -122,9 +122,20 @@ public sealed class DtrEntry : IDisposable, IHostedService text = $"\uE044 {pairCount}"; if (pairCount > 0) { - var visiblePairs = _pairManager.GetOnlineUserPairs() - .Where(x => x.IsVisible) - .Select(x => string.Format("{0} ({1})", x.PlayerName, x.UserData.AliasOrUID)); + IEnumerable visiblePairs; + if (_configService.Current.ShowUidInDtrTooltip) + { + visiblePairs = _pairManager.GetOnlineUserPairs() + .Where(x => x.IsVisible) + .Select(x => string.Format("{0} ({1})", _configService.Current.PreferNoteInDtrTooltip ? x.GetNote() ?? x.PlayerName : x.PlayerName, x.UserData.AliasOrUID )); + } + else + { + visiblePairs = _pairManager.GetOnlineUserPairs() + .Where(x => x.IsVisible) + .Select(x => string.Format("{0}", _configService.Current.PreferNoteInDtrTooltip ? x.GetNote() ?? x.PlayerName : x.PlayerName)); + } + tooltip = $"Mare Synchronos: Connected{Environment.NewLine}----------{Environment.NewLine}{string.Join(Environment.NewLine, visiblePairs)}"; } else diff --git a/MareSynchronos/UI/SettingsUi.cs b/MareSynchronos/UI/SettingsUi.cs index 9453d50..d45fbcc 100644 --- a/MareSynchronos/UI/SettingsUi.cs +++ b/MareSynchronos/UI/SettingsUi.cs @@ -559,6 +559,8 @@ public class SettingsUi : WindowMediatorSubscriberBase var profileOnRight = _configService.Current.ProfilePopoutRight; var enableRightClickMenu = _configService.Current.EnableRightClickMenus; var enableDtrEntry = _configService.Current.EnableDtrEntry; + var showUidInDtrTooltip = _configService.Current.ShowUidInDtrTooltip; + var preferNoteInDtrTooltip = _configService.Current.PreferNoteInDtrTooltip; var preferNotesInsteadOfName = _configService.Current.PreferNotesOverNamesForVisible; var groupUpSyncshells = _configService.Current.GroupUpSyncshells; var groupInVisible = _configService.Current.ShowSyncshellUsersInVisible; @@ -578,6 +580,22 @@ public class SettingsUi : WindowMediatorSubscriberBase } UiSharedService.DrawHelpText("This will add Mare connection status and visible pair count in the Server Info Bar.\nYou can further configure this through your Dalamud Settings."); + using (ImRaii.Disabled(!enableDtrEntry)) + { + using var indent = ImRaii.PushIndent(); + if (ImGui.Checkbox("Show visible character's UID in tooltip", ref showUidInDtrTooltip)) + { + _configService.Current.ShowUidInDtrTooltip = showUidInDtrTooltip; + _configService.Save(); + } + + if (ImGui.Checkbox("Prefer notes over player names in tooltip", ref preferNoteInDtrTooltip)) + { + _configService.Current.PreferNoteInDtrTooltip = preferNoteInDtrTooltip; + _configService.Save(); + } + } + if (ImGui.Checkbox("Show separate Visible group", ref showVisibleSeparate)) { _configService.Current.ShowVisibleUsersSeparately = showVisibleSeparate;