mirror of
https://github.com/Caraxi/mare.client.git
synced 2025-12-13 20:14:15 +01:00
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:
parent
fe30812aa7
commit
2cb4e799ce
1 changed files with 4 additions and 0 deletions
|
|
@ -116,18 +116,22 @@ public sealed class DtrEntry : IDisposable, IHostedService
|
||||||
}
|
}
|
||||||
|
|
||||||
string text;
|
string text;
|
||||||
|
string tooltip;
|
||||||
if (_apiController.IsConnected)
|
if (_apiController.IsConnected)
|
||||||
{
|
{
|
||||||
text = $"\uE044 {_pairManager.GetVisibleUserCount()}";
|
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
|
else
|
||||||
{
|
{
|
||||||
text = "\uE044 \uE04C";
|
text = "\uE044 \uE04C";
|
||||||
|
tooltip = "Mare Synchronos: Not Connected";
|
||||||
}
|
}
|
||||||
if (!string.Equals(text, _text, StringComparison.Ordinal))
|
if (!string.Equals(text, _text, StringComparison.Ordinal))
|
||||||
{
|
{
|
||||||
_text = text;
|
_text = text;
|
||||||
_entry.Value.Text = text;
|
_entry.Value.Text = text;
|
||||||
|
_entry.Value.Tooltip = tooltip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue