mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Display "replays watched" tooltip for replays subsection
This commit is contained in:
@ -11,20 +11,22 @@ namespace osu.Game.Overlays.Profile.Sections.Historical
|
||||
{
|
||||
public class UserHistoryGraph : UserGraph<DateTime, long>
|
||||
{
|
||||
private readonly string tooltipCounterName;
|
||||
|
||||
[CanBeNull]
|
||||
public UserHistoryCount[] Values
|
||||
{
|
||||
set => Data = value?.Select(v => new KeyValuePair<DateTime, long>(v.Date, v.Count)).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Text describing the value being plotted on the graph, which will be displayed as a prefix to the value in the <see cref="HistoryGraphTooltip"/>.
|
||||
/// </summary>
|
||||
public string TooltipCounterName { get; set; } = "Plays";
|
||||
public UserHistoryGraph(string tooltipCounterName)
|
||||
{
|
||||
this.tooltipCounterName = tooltipCounterName;
|
||||
}
|
||||
|
||||
protected override float GetDataPointHeight(long playCount) => playCount;
|
||||
|
||||
protected override UserGraphTooltip GetTooltip() => new HistoryGraphTooltip(TooltipCounterName);
|
||||
protected override UserGraphTooltip GetTooltip() => new HistoryGraphTooltip(tooltipCounterName);
|
||||
|
||||
protected override object GetTooltipContent(DateTime date, long playCount)
|
||||
{
|
||||
|
Reference in New Issue
Block a user