mirror of
https://github.com/ppy/osu.git
synced 2025-03-05 16:02:56 +08:00
Make button protected
This commit is contained in:
parent
bdce79ed5b
commit
29dd225205
@ -25,14 +25,14 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
[Cached]
|
[Cached]
|
||||||
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
private readonly OverlayColourProvider colourProvider = new OverlayColourProvider(OverlayColourScheme.Blue);
|
||||||
|
|
||||||
private OverlayScrollContainer scroll;
|
private TestScrollContainer scroll;
|
||||||
|
|
||||||
private int invocationCount;
|
private int invocationCount;
|
||||||
|
|
||||||
[SetUp]
|
[SetUp]
|
||||||
public void SetUp() => Schedule(() =>
|
public void SetUp() => Schedule(() =>
|
||||||
{
|
{
|
||||||
Child = scroll = new OverlayScrollContainer
|
Child = scroll = new TestScrollContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Child = new Container
|
Child = new Container
|
||||||
@ -104,5 +104,10 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
AddAssert("invocation count is 1", () => invocationCount == 1);
|
AddAssert("invocation count is 1", () => invocationCount == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class TestScrollContainer : OverlayScrollContainer
|
||||||
|
{
|
||||||
|
public new ScrollToTopButton Button => base.Button;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ namespace osu.Game.Overlays
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private const int button_scroll_position = 200;
|
private const int button_scroll_position = 200;
|
||||||
|
|
||||||
public ScrollToTopButton Button { get; }
|
protected readonly ScrollToTopButton Button;
|
||||||
|
|
||||||
private float currentTarget;
|
private float currentTarget;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user