mirror of
https://github.com/ppy/osu.git
synced 2025-03-15 13:27:20 +08:00
Merge pull request #5763 from peppy/fix-tooltips-not-displaying
Fix osu! default tooltips not displaying
This commit is contained in:
commit
686942446c
@ -30,22 +30,24 @@ namespace osu.Game.Graphics.Cursor
|
||||
private readonly OsuSpriteText text;
|
||||
private bool instantMovement = true;
|
||||
|
||||
public override string TooltipText
|
||||
public override bool SetContent(object content)
|
||||
{
|
||||
set
|
||||
if (!(content is string contentString))
|
||||
return false;
|
||||
|
||||
if (contentString == text.Text) return true;
|
||||
|
||||
text.Text = contentString;
|
||||
|
||||
if (IsPresent)
|
||||
{
|
||||
if (value == text.Text) return;
|
||||
|
||||
text.Text = value;
|
||||
|
||||
if (IsPresent)
|
||||
{
|
||||
AutoSizeDuration = 250;
|
||||
background.FlashColour(OsuColour.Gray(0.4f), 1000, Easing.OutQuint);
|
||||
}
|
||||
else
|
||||
AutoSizeDuration = 0;
|
||||
AutoSizeDuration = 250;
|
||||
background.FlashColour(OsuColour.Gray(0.4f), 1000, Easing.OutQuint);
|
||||
}
|
||||
else
|
||||
AutoSizeDuration = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public OsuTooltip()
|
||||
|
Loading…
x
Reference in New Issue
Block a user