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:
parent
68d9f9de46
commit
c86bb2e755
@ -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;
|
||||||
|
@ -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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user