Added names of visible players to tooltip of server bar (#61)
* Added names of visible players to tooltip of server bar * match variable name * changes as requested
This commit is contained in:
@@ -116,18 +116,22 @@ public sealed class DtrEntry : IDisposable, IHostedService
|
||||
}
|
||||
|
||||
string text;
|
||||
string tooltip;
|
||||
if (_apiController.IsConnected)
|
||||
{
|
||||
text = $"\uE044 {_pairManager.GetVisibleUserCount()}";
|
||||
tooltip = $"Mare Synchronos: Connected{Environment.NewLine}----------{Environment.NewLine}{string.Join(Environment.NewLine, _pairManager.GetOnlineUserPairs().Where(x => x.IsVisible).Select(x => string.Format("{0} ({1})", x.PlayerName, x.UserData.AliasOrUID)))}";
|
||||
}
|
||||
else
|
||||
{
|
||||
text = "\uE044 \uE04C";
|
||||
tooltip = "Mare Synchronos: Not Connected";
|
||||
}
|
||||
if (!string.Equals(text, _text, StringComparison.Ordinal))
|
||||
{
|
||||
_text = text;
|
||||
_entry.Value.Text = text;
|
||||
_entry.Value.Tooltip = tooltip;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user