mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 06:42:56 +08:00
add sound to scroll-to-top button
This commit is contained in:
parent
2cd72a92e8
commit
752d0a9f0b
@ -7,6 +7,7 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Containers
|
namespace osu.Game.Graphics.Containers
|
||||||
{
|
{
|
||||||
@ -20,7 +21,8 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
protected virtual IEnumerable<Drawable> EffectTargets => new[] { Content };
|
protected virtual IEnumerable<Drawable> EffectTargets => new[] { Content };
|
||||||
|
|
||||||
public OsuHoverContainer()
|
public OsuHoverContainer(HoverSampleSet sampleSet = HoverSampleSet.Default)
|
||||||
|
: base(sampleSet)
|
||||||
{
|
{
|
||||||
Enabled.ValueChanged += e =>
|
Enabled.ValueChanged += e =>
|
||||||
{
|
{
|
||||||
|
@ -20,6 +20,9 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
Toolbar,
|
Toolbar,
|
||||||
|
|
||||||
[Description("songselect")]
|
[Description("songselect")]
|
||||||
SongSelect
|
SongSelect,
|
||||||
|
|
||||||
|
[Description("scrolltotop")]
|
||||||
|
ScrollToTop
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Shapes;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -84,6 +85,7 @@ namespace osu.Game.Overlays
|
|||||||
private readonly Box background;
|
private readonly Box background;
|
||||||
|
|
||||||
public ScrollToTopButton()
|
public ScrollToTopButton()
|
||||||
|
: base(HoverSampleSet.ScrollToTop)
|
||||||
{
|
{
|
||||||
Size = new Vector2(50);
|
Size = new Vector2(50);
|
||||||
Alpha = 0;
|
Alpha = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user