Fix overlays closing when clicking any empty area of the toolbar instead

This commit is contained in:
Joseph Madamba
2021-08-28 22:25:13 -07:00
parent 38912bfc16
commit 9a5445bded
2 changed files with 7 additions and 3 deletions

View File

@ -41,6 +41,9 @@ namespace osu.Game.Overlays.Toolbar
// Toolbar and its components need keyboard input even when hidden.
public override bool PropagateNonPositionalInputSubTree => true;
// IsHovered is used
public override bool HandlePositionalInput => true;
public Toolbar()
{
RelativeSizeAxes = Axes.X;
@ -140,12 +143,13 @@ namespace osu.Game.Overlays.Toolbar
protected override bool OnHover(HoverEvent e)
{
gradientBackground.FadeIn(transition_time, Easing.OutQuint);
return true;
return base.OnHover(e);
}
protected override void OnHoverLost(HoverLostEvent e)
{
gradientBackground.FadeOut(transition_time, Easing.OutQuint);
base.OnHoverLost(e);
}
}