mirror of https://github.com/ppy/osu
Fix failing test
This commit is contained in:
parent
2dc81bbcfa
commit
179bd1ce7e
|
@ -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 };
|
||||
|
||||
|
|
Loading…
Reference in New Issue