Fix failing test

This commit is contained in:
Andrei Zavatski 2020-03-30 13:38:04 +03:00
parent 2dc81bbcfa
commit 179bd1ce7e
1 changed files with 8 additions and 2 deletions

View File

@ -4,6 +4,7 @@
using System;
using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
@ -83,7 +84,10 @@ public Action Action
public ScrollToTopButton()
{
Size = new Vector2(50);
Child = button = new Button();
Child = button = new Button
{
AreaState = { BindTarget = State }
};
}
protected override bool OnMouseDown(MouseDownEvent e) => true;
@ -94,7 +98,9 @@ public ScrollToTopButton()
private class Button : OsuHoverContainer
{
public override bool PropagatePositionalInputSubTree => Alpha == 1;
public readonly Bindable<Visibility> AreaState = new Bindable<Visibility>();
public override bool HandlePositionalInput => AreaState.Value == Visibility.Visible;
protected override IEnumerable<Drawable> EffectTargets => new[] { background };