1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 14:32:55 +08:00

Convert to class to allow not displaying tooltips

With `struct` content, it is never possible to not show a tooltip.
This commit is contained in:
Salman Ahmed 2021-08-31 21:13:20 +03:00
parent 3969350c9a
commit b0d7104650

View File

@ -125,7 +125,7 @@ namespace osu.Game.Overlays.Profile
get
{
if (data == null || hoveredIndex == -1)
return default;
return null;
var (key, value) = data[hoveredIndex];
return GetTooltipContent(key, value);
@ -295,7 +295,7 @@ namespace osu.Game.Overlays.Profile
}
}
public readonly struct UserGraphTooltipContent
public class UserGraphTooltipContent
{
// todo: could use init-only properties on C# 9 which read better than a constructor.
public LocalisableString Name { get; }