Make toolbar handle mouse events instead

This commit is contained in:
Joseph Madamba
2021-08-30 20:53:43 -07:00
parent 7bb2269eba
commit 570d36fde7
3 changed files with 7 additions and 7 deletions

View File

@ -41,8 +41,7 @@ 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;
protected override bool Handle(UIEvent e) => e is MouseEvent;
public Toolbar()
{
@ -143,13 +142,12 @@ namespace osu.Game.Overlays.Toolbar
protected override bool OnHover(HoverEvent e)
{
gradientBackground.FadeIn(transition_time, Easing.OutQuint);
return base.OnHover(e);
return true;
}
protected override void OnHoverLost(HoverLostEvent e)
{
gradientBackground.FadeOut(transition_time, Easing.OutQuint);
base.OnHoverLost(e);
}
}