mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Remove necessity for MusicController to be always visible
This commit is contained in:
@ -70,9 +70,6 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
Width = 400;
|
||||
Margin = new MarginPadding(10);
|
||||
|
||||
// required to let MusicController handle beatmap cycling.
|
||||
AlwaysPresent = true;
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -349,18 +346,11 @@ namespace osu.Game.Overlays
|
||||
|
||||
direction = last > next ? TransformDirection.Prev : TransformDirection.Next;
|
||||
}
|
||||
|
||||
//current.Track.Completed -= currentTrackCompleted;
|
||||
}
|
||||
|
||||
current = beatmap.NewValue;
|
||||
|
||||
if (current != null)
|
||||
current.Track.Completed += currentTrackCompleted;
|
||||
|
||||
progressBar.CurrentTime = 0;
|
||||
|
||||
updateDisplay(current, direction);
|
||||
updateDisplay(current = beatmap.NewValue, direction);
|
||||
updateAudioAdjustments();
|
||||
|
||||
queuedDirection = null;
|
||||
@ -378,12 +368,6 @@ namespace osu.Game.Overlays
|
||||
mod.ApplyToClock(track);
|
||||
}
|
||||
|
||||
private void currentTrackCompleted() => Schedule(() =>
|
||||
{
|
||||
if (!current.Track.Looping && !beatmap.Disabled && beatmapSets.Any())
|
||||
next();
|
||||
});
|
||||
|
||||
private ScheduledDelegate pendingBeatmapSwitch;
|
||||
|
||||
private void updateDisplay(WorkingBeatmap beatmap, TransformDirection direction)
|
||||
@ -447,10 +431,6 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
base.PopOut();
|
||||
|
||||
// This is here mostly as a performance fix.
|
||||
// If the playlist is not hidden it will update children even when the music controller is hidden (due to AlwaysPresent).
|
||||
playlist.Hide();
|
||||
|
||||
this.FadeOut(transition_length, Easing.OutQuint);
|
||||
dragContainer.ScaleTo(0.9f, transition_length, Easing.OutQuint);
|
||||
}
|
||||
@ -548,5 +528,10 @@ namespace osu.Game.Overlays
|
||||
return base.OnDragEnd(e);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Play the next random or playlist track.
|
||||
/// </summary>
|
||||
public void NextTrack() => next();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user