Refactor tooltip construction

This commit is contained in:
Bartłomiej Dach
2020-02-12 19:15:37 +01:00
parent e2ecef732c
commit 2b0bdd1db5
3 changed files with 21 additions and 17 deletions

View File

@ -42,15 +42,12 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
}
}
protected override object GetTooltipContent()
protected override object GetTooltipContent(DateTime date, long playCount)
{
if (!Data?.Any() ?? true)
return null;
return new TooltipDisplayContent
{
Count = Data[DataIndex].Value.ToString("N0"),
Date = Data[DataIndex].Key.ToString("MMMM yyyy")
Count = playCount.ToString("N0"),
Date = date.ToString("MMMM yyyy")
};
}