diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index 2de31cf399..27b87e4fa5 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -78,27 +78,6 @@ namespace osu.Game.Screens.Menu holdDelay = config.GetBindable(OsuSetting.UIHoldActivationDelay); loginDisplayed = statics.GetBindable(Static.LoginOverlayDisplayed); - AddInternal(songTicker = new SongTicker - { - Anchor = Anchor.TopRight, - Origin = Anchor.TopRight, - Margin = new MarginPadding { Right = 15, Top = 5 } - }); - - if (host.CanExit) - { - AddInternal(exitConfirmOverlay = new ExitConfirmOverlay - { - Action = () => - { - if (holdDelay.Value > 0) - confirmAndExit(); - else - this.Exit(); - } - }); - } - AddRangeInternal(new Drawable[] { buttonsContainer = new ParallaxContainer @@ -117,8 +96,28 @@ namespace osu.Game.Screens.Menu } }, sideFlashes = new MenuSideFlashes(), + songTicker = new SongTicker + { + Anchor = Anchor.TopRight, + Origin = Anchor.TopRight, + Margin = new MarginPadding { Right = 15, Top = 5 } + } }); + if (host.CanExit) + { + AddInternal(exitConfirmOverlay = new ExitConfirmOverlay + { + Action = () => + { + if (holdDelay.Value > 0) + confirmAndExit(); + else + this.Exit(); + } + }); + } + buttons.StateChanged += state => { switch (state) @@ -236,9 +235,6 @@ namespace osu.Game.Screens.Menu buttons.State = ButtonSystemState.EnteringMode; - songTicker.FadeOut(100, Easing.OutQuint); - songTicker.AllowUpdates = false; - this.FadeOut(FADE_OUT_DURATION, Easing.InSine); buttonsContainer.MoveTo(new Vector2(-800, 0), FADE_OUT_DURATION, Easing.InSine); @@ -249,8 +245,6 @@ namespace osu.Game.Screens.Menu { base.OnResuming(last); - songTicker.AllowUpdates = true; - (Background as BackgroundScreenDefault)?.Next(); //we may have consumed our preloaded instance, so let's make another. @@ -277,8 +271,10 @@ namespace osu.Game.Screens.Menu } buttons.State = ButtonSystemState.Exit; - this.FadeOut(3000); + songTicker.Hide(); + + this.FadeOut(3000); return base.OnExiting(next); } diff --git a/osu.Game/Screens/Menu/SongTicker.cs b/osu.Game/Screens/Menu/SongTicker.cs index f858d162d2..c3569b7ccb 100644 --- a/osu.Game/Screens/Menu/SongTicker.cs +++ b/osu.Game/Screens/Menu/SongTicker.cs @@ -1,4 +1,4 @@ -// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. +// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Allocation; @@ -17,8 +17,6 @@ namespace osu.Game.Screens.Menu { private const int fade_duration = 800; - public bool AllowUpdates { get; set; } = true; - [Resolved] private Bindable beatmap { get; set; } @@ -58,8 +56,7 @@ namespace osu.Game.Screens.Menu private void onBeatmapChanged(ValueChangedEvent working) { - if (!AllowUpdates) - return; + var metadata = beatmap.Value.Metadata; var metadata = working.NewValue.Metadata;