1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-14 00:42:55 +08:00

add sound to scroll-to-top button

This commit is contained in:
Jamie Taylor 2021-06-18 16:08:14 +09:00
parent 2cd72a92e8
commit 752d0a9f0b
No known key found for this signature in database
GPG Key ID: 2ACFA8B6370B8C8C
3 changed files with 9 additions and 2 deletions

View File

@ -7,6 +7,7 @@ using osu.Framework.Graphics;
using osu.Framework.Input.Events;
using osuTK.Graphics;
using System.Collections.Generic;
using osu.Game.Graphics.UserInterface;
namespace osu.Game.Graphics.Containers
{
@ -20,7 +21,8 @@ namespace osu.Game.Graphics.Containers
protected virtual IEnumerable<Drawable> EffectTargets => new[] { Content };
public OsuHoverContainer()
public OsuHoverContainer(HoverSampleSet sampleSet = HoverSampleSet.Default)
: base(sampleSet)
{
Enabled.ValueChanged += e =>
{

View File

@ -20,6 +20,9 @@ namespace osu.Game.Graphics.UserInterface
Toolbar,
[Description("songselect")]
SongSelect
SongSelect,
[Description("scrolltotop")]
ScrollToTop
}
}

View File

@ -11,6 +11,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.Events;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface;
using osuTK;
using osuTK.Graphics;
@ -84,6 +85,7 @@ namespace osu.Game.Overlays
private readonly Box background;
public ScrollToTopButton()
: base(HoverSampleSet.ScrollToTop)
{
Size = new Vector2(50);
Alpha = 0;