Rename `ScrollToTopButton` to `ScrollBackButton`

This commit is contained in:
Joseph Madamba 2023-02-26 14:39:34 -08:00
parent dc00905f8d
commit fa710ae1b0
No known key found for this signature in database
GPG Key ID: 8B746C7BDDF0BD76
2 changed files with 7 additions and 7 deletions

View File

@ -126,7 +126,7 @@ public void TestMultipleClicks()
private partial class TestScrollContainer : OverlayScrollContainer
{
public new ScrollToTopButton Button => base.Button;
public new ScrollBackButton Button => base.Button;
}
}
}

View File

@ -22,23 +22,23 @@
namespace osu.Game.Overlays
{
/// <summary>
/// <see cref="UserTrackingScrollContainer"/> which provides <see cref="ScrollToTopButton"/>. Mostly used in <see cref="FullscreenOverlay{T}"/>.
/// <see cref="UserTrackingScrollContainer"/> which provides <see cref="ScrollBackButton"/>. Mostly used in <see cref="FullscreenOverlay{T}"/>.
/// </summary>
public partial class OverlayScrollContainer : UserTrackingScrollContainer
{
/// <summary>
/// Scroll position at which the <see cref="ScrollToTopButton"/> will be shown.
/// Scroll position at which the <see cref="ScrollBackButton"/> will be shown.
/// </summary>
private const int button_scroll_position = 200;
protected ScrollToTopButton Button;
protected ScrollBackButton Button;
private readonly Bindable<float?> lastScrollTarget = new Bindable<float?>();
[BackgroundDependencyLoader]
private void load()
{
AddInternal(Button = new ScrollToTopButton
AddInternal(Button = new ScrollBackButton
{
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight,
@ -82,7 +82,7 @@ private void scrollBack()
}
}
public partial class ScrollToTopButton : OsuHoverContainer
public partial class ScrollBackButton : OsuHoverContainer
{
private const int fade_duration = 500;
@ -112,7 +112,7 @@ public Visibility State
public Bindable<float?> LastScrollTarget = new Bindable<float?>();
public ScrollToTopButton()
public ScrollBackButton()
: base(HoverSampleSet.ScrollToTop)
{
Size = new Vector2(50);