1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 18:47:27 +08:00

Use DrawableDate tooltip for DateContainer

This commit is contained in:
Andrei Zavatski 2020-07-07 00:01:06 +03:00
parent 68d9f9de46
commit c86bb2e755
2 changed files with 5 additions and 3 deletions

View File

@ -82,7 +82,7 @@ namespace osu.Game.Graphics
public object TooltipContent => Date; public object TooltipContent => Date;
private class DateTooltip : VisibilityContainer, ITooltip public class DateTooltip : VisibilityContainer, ITooltip
{ {
private readonly OsuSpriteText dateText, timeText; private readonly OsuSpriteText dateText, timeText;
private readonly Box background; private readonly Box background;

View File

@ -156,9 +156,11 @@ namespace osu.Game.Overlays.News
} }
} }
private class DateContainer : CircularContainer, IHasTooltip private class DateContainer : CircularContainer, IHasCustomTooltip
{ {
public string TooltipText => date.ToString("d MMMM yyyy hh:mm:ss UTCz"); public ITooltip GetCustomTooltip() => new DrawableDate.DateTooltip();
public object TooltipContent => date;
private readonly DateTimeOffset date; private readonly DateTimeOffset date;