mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Updated to use ppy's implementation
This commit is contained in:
@ -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,
|
||||
},
|
||||
|
Reference in New Issue
Block a user