mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:37:28 +08:00
Merge branch 'master' into add-collections-to-beatmap-options
This commit is contained in:
commit
6cbff98295
@ -518,6 +518,8 @@ namespace osu.Game.Screens.Select
|
||||
FilterControl.Activate();
|
||||
|
||||
ModSelect.SelectedMods.BindTo(selectedMods);
|
||||
|
||||
music.TrackChanged += ensureTrackLooping;
|
||||
}
|
||||
|
||||
private const double logo_transition = 250;
|
||||
@ -569,6 +571,7 @@ namespace osu.Game.Screens.Select
|
||||
BeatmapDetails.Refresh();
|
||||
|
||||
music.CurrentTrack.Looping = true;
|
||||
music.TrackChanged += ensureTrackLooping;
|
||||
music.ResetTrackAdjustments();
|
||||
|
||||
if (Beatmap != null && !Beatmap.Value.BeatmapSetInfo.DeletePending)
|
||||
@ -594,6 +597,7 @@ namespace osu.Game.Screens.Select
|
||||
BeatmapOptions.Hide();
|
||||
|
||||
music.CurrentTrack.Looping = false;
|
||||
music.TrackChanged -= ensureTrackLooping;
|
||||
|
||||
this.ScaleTo(1.1f, 250, Easing.InSine);
|
||||
|
||||
@ -615,10 +619,14 @@ namespace osu.Game.Screens.Select
|
||||
FilterControl.Deactivate();
|
||||
|
||||
music.CurrentTrack.Looping = false;
|
||||
music.TrackChanged -= ensureTrackLooping;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void ensureTrackLooping(WorkingBeatmap beatmap, TrackChangeDirection changeDirection)
|
||||
=> music.CurrentTrack.Looping = true;
|
||||
|
||||
public override bool OnBackButton()
|
||||
{
|
||||
if (ModSelect.State.Value == Visibility.Visible)
|
||||
@ -635,6 +643,9 @@ namespace osu.Game.Screens.Select
|
||||
base.Dispose(isDisposing);
|
||||
|
||||
decoupledRuleset.UnbindAll();
|
||||
|
||||
if (music != null)
|
||||
music.TrackChanged -= ensureTrackLooping;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -654,8 +665,6 @@ namespace osu.Game.Screens.Select
|
||||
beatmapInfoWedge.Beatmap = beatmap;
|
||||
|
||||
BeatmapDetails.Beatmap = beatmap;
|
||||
|
||||
music.CurrentTrack.Looping = true;
|
||||
}
|
||||
|
||||
private readonly WeakReference<ITrack> lastTrack = new WeakReference<ITrack>(null);
|
||||
|
@ -81,6 +81,12 @@ namespace osu.Game.Tests.Visual
|
||||
LoadScreen(Player);
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
LocalConfig?.Dispose();
|
||||
base.Dispose(isDisposing);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates the ruleset for setting up the <see cref="Player"/> component.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user