mirror of
https://github.com/osukey/osukey.git
synced 2025-05-07 06:37:18 +09:00
Merge pull request #856 from MrTheMake/musiccontroller-init-fix
Fix initialize beatmap change animation of the music controller
This commit is contained in:
commit
06349c580d
@ -266,24 +266,27 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
progressBar.IsEnabled = beatmap != null;
|
progressBar.IsEnabled = beatmap != null;
|
||||||
|
|
||||||
bool audioEquals = beatmapBacking.Value?.BeatmapInfo?.AudioEquals(current?.BeatmapInfo) ?? false;
|
TransformDirection direction = TransformDirection.None;
|
||||||
|
|
||||||
TransformDirection direction;
|
if (current != null)
|
||||||
|
|
||||||
if (audioEquals)
|
|
||||||
direction = TransformDirection.None;
|
|
||||||
else if (queuedDirection.HasValue)
|
|
||||||
{
|
{
|
||||||
direction = queuedDirection.Value;
|
bool audioEquals = beatmapBacking.Value?.BeatmapInfo?.AudioEquals(current.BeatmapInfo) ?? false;
|
||||||
queuedDirection = null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//figure out the best direction based on order in playlist.
|
|
||||||
var last = current == null ? -1 : playlist.BeatmapSets.TakeWhile(b => b.ID != current.BeatmapSetInfo.ID).Count();
|
|
||||||
var next = beatmapBacking.Value == null ? -1 : playlist.BeatmapSets.TakeWhile(b => b.ID != beatmapBacking.Value.BeatmapSetInfo.ID).Count();
|
|
||||||
|
|
||||||
direction = last > next ? TransformDirection.Prev : TransformDirection.Next;
|
if (audioEquals)
|
||||||
|
direction = TransformDirection.None;
|
||||||
|
else if (queuedDirection.HasValue)
|
||||||
|
{
|
||||||
|
direction = queuedDirection.Value;
|
||||||
|
queuedDirection = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//figure out the best direction based on order in playlist.
|
||||||
|
var last = playlist.BeatmapSets.TakeWhile(b => b.ID != current.BeatmapSetInfo.ID).Count();
|
||||||
|
var next = beatmapBacking.Value == null ? -1 : playlist.BeatmapSets.TakeWhile(b => b.ID != beatmapBacking.Value.BeatmapSetInfo.ID).Count();
|
||||||
|
|
||||||
|
direction = last > next ? TransformDirection.Prev : TransformDirection.Next;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
current = beatmapBacking.Value;
|
current = beatmapBacking.Value;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user