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

Fully delegate tooltip show/hide logic

This commit is contained in:
Bartłomiej Dach 2023-11-10 18:36:09 +09:00
parent 36d0bae42d
commit fbf94214a5
No known key found for this signature in database

View File

@ -105,17 +105,17 @@ namespace osu.Game.Users.Drawables
public partial class NoCardTooltip : VisibilityContainer, ITooltip<APIUser?>
{
private readonly OsuTooltipContainer.OsuTooltip tooltip;
public NoCardTooltip()
{
var tooltip = new OsuTooltipContainer.OsuTooltip();
tooltip = new OsuTooltipContainer.OsuTooltip();
tooltip.SetContent(ContextMenuStrings.ViewProfile);
tooltip.Show();
Child = tooltip;
}
protected override void PopIn() => this.FadeIn(150, Easing.OutQuint);
protected override void PopOut() => this.Delay(150).FadeOut(500, Easing.OutQuint);
protected override void PopIn() => tooltip.Show();
protected override void PopOut() => tooltip.Hide();
public void Move(Vector2 pos) => Position = pos;