mirror of
https://github.com/ppy/osu.git
synced 2024-11-07 18:07:28 +08:00
Merge pull request #5759 from Game4all/music-playback-improvements
Prevent beatmap change during intro playback Co-authored-by: Dean Herbert <pe@ppy.sh>
This commit is contained in:
commit
5802ce74e8
@ -28,11 +28,18 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
private Bindable<bool> menuVoice;
|
||||
|
||||
private LeasedBindable<WorkingBeatmap> beatmap;
|
||||
|
||||
public new Bindable<WorkingBeatmap> Beatmap => beatmap;
|
||||
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBlack();
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game)
|
||||
{
|
||||
// prevent user from changing beatmap while the intro is still runnning.
|
||||
beatmap = base.Beatmap.BeginLease(false);
|
||||
|
||||
menuVoice = config.GetBindable<bool>(OsuSetting.MenuVoice);
|
||||
seeya = audio.Samples.Get(@"seeya");
|
||||
}
|
||||
@ -107,6 +114,8 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
protected void LoadMenu()
|
||||
{
|
||||
beatmap.Return();
|
||||
|
||||
DidLoadMenu = true;
|
||||
this.Push(mainMenu);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user