mirror of
https://github.com/ppy/osu.git
synced 2024-11-06 10:47:28 +08:00
Fix tooltips sticking after drag.
This commit is contained in:
parent
02e406860b
commit
4e1942f998
@ -55,9 +55,20 @@ namespace osu.Game.Graphics.Cursor
|
||||
}
|
||||
}
|
||||
|
||||
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
||||
{
|
||||
updateTooltipState(state);
|
||||
return base.OnMouseUp(state, args);
|
||||
}
|
||||
|
||||
protected override bool OnMouseMove(InputState state)
|
||||
{
|
||||
updateTooltipState(state);
|
||||
return base.OnMouseMove(state);
|
||||
}
|
||||
|
||||
private void updateTooltipState(InputState state)
|
||||
{
|
||||
if (currentlyDisplayed?.Hovering != true)
|
||||
{
|
||||
if (currentlyDisplayed != null && !state.Mouse.HasMainButtonPressed)
|
||||
@ -80,8 +91,6 @@ namespace osu.Game.Graphics.Cursor
|
||||
currentlyDisplayed = tooltipTarget;
|
||||
}, (1 - tooltip.Alpha) * default_appear_delay);
|
||||
}
|
||||
|
||||
return base.OnMouseMove(state);
|
||||
}
|
||||
|
||||
public class Tooltip : Container
|
||||
|
Loading…
Reference in New Issue
Block a user