mirror of
https://github.com/osukey/osukey.git
synced 2025-05-29 17:37:23 +09:00
Only instantly move tooltip is we are not visible
This commit is contained in:
parent
04f0b5204a
commit
c85a0223b0
@ -25,7 +25,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
{
|
{
|
||||||
private readonly Box background;
|
private readonly Box background;
|
||||||
private readonly OsuSpriteText text;
|
private readonly OsuSpriteText text;
|
||||||
private bool firstMovement = true;
|
private bool instantMovement = true;
|
||||||
|
|
||||||
public override string TooltipText
|
public override string TooltipText
|
||||||
{
|
{
|
||||||
@ -34,7 +34,7 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
if (value == text.Text) return;
|
if (value == text.Text) return;
|
||||||
|
|
||||||
text.Text = value;
|
text.Text = value;
|
||||||
if (Alpha > 0)
|
if (IsPresent)
|
||||||
{
|
{
|
||||||
AutoSizeDuration = 250;
|
AutoSizeDuration = 250;
|
||||||
background.FlashColour(OsuColour.Gray(0.4f), 1000, EasingTypes.OutQuint);
|
background.FlashColour(OsuColour.Gray(0.4f), 1000, EasingTypes.OutQuint);
|
||||||
@ -82,8 +82,8 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
|
|
||||||
protected override void PopIn()
|
protected override void PopIn()
|
||||||
{
|
{
|
||||||
|
instantMovement |= !IsPresent;
|
||||||
FadeIn(500, EasingTypes.OutQuint);
|
FadeIn(500, EasingTypes.OutQuint);
|
||||||
firstMovement = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
@ -94,10 +94,10 @@ namespace osu.Game.Graphics.Cursor
|
|||||||
|
|
||||||
public override void Move(Vector2 pos)
|
public override void Move(Vector2 pos)
|
||||||
{
|
{
|
||||||
if (firstMovement)
|
if (instantMovement)
|
||||||
{
|
{
|
||||||
Position = pos;
|
Position = pos;
|
||||||
firstMovement = false;
|
instantMovement = false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user