Added count to lightfinder label
This commit is contained in:
@@ -781,7 +781,8 @@ public class TopTabMenu
|
|||||||
{
|
{
|
||||||
var buttonX = (availableWidth - (spacingX)) / 2f;
|
var buttonX = (availableWidth - (spacingX)) / 2f;
|
||||||
|
|
||||||
if (_uiSharedService.IconTextButton(FontAwesomeIcon.PersonCirclePlus, "Lightfinder", buttonX, center: true))
|
var lightFinderLabel = GetLightfinderFinderLabel();
|
||||||
|
if (_uiSharedService.IconTextButton(FontAwesomeIcon.PersonCirclePlus, lightFinderLabel, buttonX, center: true))
|
||||||
{
|
{
|
||||||
_lightlessMediator.Publish(new UiToggleMessage(typeof(LightFinderUI)));
|
_lightlessMediator.Publish(new UiToggleMessage(typeof(LightFinderUI)));
|
||||||
}
|
}
|
||||||
@@ -795,6 +796,20 @@ public class TopTabMenu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private string GetLightfinderFinderLabel()
|
||||||
|
{
|
||||||
|
string label = "Lightfinder";
|
||||||
|
|
||||||
|
if (_lightFinderService.IsBroadcasting)
|
||||||
|
{
|
||||||
|
var hashExclude = _dalamudUtilService.GetCID().ToString().GetHash256();
|
||||||
|
var nearbyCount = _lightFinderScannerService.GetActiveBroadcasts(hashExclude).Count;
|
||||||
|
return $"{label} ({nearbyCount})";
|
||||||
|
}
|
||||||
|
|
||||||
|
return label;
|
||||||
|
}
|
||||||
|
|
||||||
private string GetSyncshellFinderLabel()
|
private string GetSyncshellFinderLabel()
|
||||||
{
|
{
|
||||||
if (!_lightFinderService.IsBroadcasting)
|
if (!_lightFinderService.IsBroadcasting)
|
||||||
|
|||||||
Reference in New Issue
Block a user