Updated to use ppy's implementation

This commit is contained in:
MrTheMake
2017-07-14 12:08:56 +02:00
211 changed files with 2744 additions and 1414 deletions

View File

@ -24,10 +24,11 @@ using osu.Game.Graphics.Sprites;
using osu.Game.Overlays.Music;
using osu.Game.Graphics.UserInterface;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.Containers;
namespace osu.Game.Overlays
{
public class MusicController : FocusedOverlayContainer
public class MusicController : OsuFocusedOverlayContainer
{
private const float player_height = 130;
@ -64,6 +65,9 @@ namespace osu.Game.Overlays
{
Width = 400;
Margin = new MarginPadding(10);
// required to let MusicController handle beatmap cycling.
AlwaysPresent = true;
}
protected override bool OnDragStart(InputState state) => true;
@ -283,12 +287,16 @@ namespace osu.Game.Overlays
private void prev()
{
if (beatmapBacking.Disabled) return;
queuedDirection = TransformDirection.Prev;
playlist.PlayPrevious();
}
private void next()
{
if (beatmapBacking.Disabled) return;
queuedDirection = TransformDirection.Next;
playlist.PlayNext();
}
@ -432,6 +440,7 @@ namespace osu.Game.Overlays
{
sprite = new Sprite
{
RelativeSizeAxes = Axes.Both,
Colour = OsuColour.Gray(150),
FillMode = FillMode.Fill,
},