mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-12 20:17:22 +01:00
Some display options for DTR tooltip (#66)
This commit is contained in:
parent
984ee08a2b
commit
a663c26df0
3 changed files with 34 additions and 3 deletions
|
|
@ -10,6 +10,8 @@ public class MareConfig : IMareConfiguration
|
||||||
public string CacheFolder { get; set; } = string.Empty;
|
public string CacheFolder { get; set; } = string.Empty;
|
||||||
public bool DisableOptionalPluginWarnings { get; set; } = false;
|
public bool DisableOptionalPluginWarnings { get; set; } = false;
|
||||||
public bool EnableDtrEntry { 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 bool EnableRightClickMenus { get; set; } = true;
|
||||||
public NotificationLocation ErrorNotification { get; set; } = NotificationLocation.Both;
|
public NotificationLocation ErrorNotification { get; set; } = NotificationLocation.Both;
|
||||||
public string ExportFolder { get; set; } = string.Empty;
|
public string ExportFolder { get; set; } = string.Empty;
|
||||||
|
|
|
||||||
|
|
@ -122,9 +122,20 @@ public sealed class DtrEntry : IDisposable, IHostedService
|
||||||
text = $"\uE044 {pairCount}";
|
text = $"\uE044 {pairCount}";
|
||||||
if (pairCount > 0)
|
if (pairCount > 0)
|
||||||
{
|
{
|
||||||
var visiblePairs = _pairManager.GetOnlineUserPairs()
|
IEnumerable<string> visiblePairs;
|
||||||
.Where(x => x.IsVisible)
|
if (_configService.Current.ShowUidInDtrTooltip)
|
||||||
.Select(x => string.Format("{0} ({1})", x.PlayerName, x.UserData.AliasOrUID));
|
{
|
||||||
|
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)}";
|
tooltip = $"Mare Synchronos: Connected{Environment.NewLine}----------{Environment.NewLine}{string.Join(Environment.NewLine, visiblePairs)}";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -559,6 +559,8 @@ public class SettingsUi : WindowMediatorSubscriberBase
|
||||||
var profileOnRight = _configService.Current.ProfilePopoutRight;
|
var profileOnRight = _configService.Current.ProfilePopoutRight;
|
||||||
var enableRightClickMenu = _configService.Current.EnableRightClickMenus;
|
var enableRightClickMenu = _configService.Current.EnableRightClickMenus;
|
||||||
var enableDtrEntry = _configService.Current.EnableDtrEntry;
|
var enableDtrEntry = _configService.Current.EnableDtrEntry;
|
||||||
|
var showUidInDtrTooltip = _configService.Current.ShowUidInDtrTooltip;
|
||||||
|
var preferNoteInDtrTooltip = _configService.Current.PreferNoteInDtrTooltip;
|
||||||
var preferNotesInsteadOfName = _configService.Current.PreferNotesOverNamesForVisible;
|
var preferNotesInsteadOfName = _configService.Current.PreferNotesOverNamesForVisible;
|
||||||
var groupUpSyncshells = _configService.Current.GroupUpSyncshells;
|
var groupUpSyncshells = _configService.Current.GroupUpSyncshells;
|
||||||
var groupInVisible = _configService.Current.ShowSyncshellUsersInVisible;
|
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.");
|
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))
|
if (ImGui.Checkbox("Show separate Visible group", ref showVisibleSeparate))
|
||||||
{
|
{
|
||||||
_configService.Current.ShowVisibleUsersSeparately = showVisibleSeparate;
|
_configService.Current.ShowVisibleUsersSeparately = showVisibleSeparate;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue