mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 08:20:00 +09:00
Move intro screen background to base implementation and use colour fading
This commit is contained in:
@ -88,6 +88,11 @@ namespace osu.Game.Screens.Menu
|
||||
/// </summary>
|
||||
protected bool UsingThemedIntro { get; private set; }
|
||||
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenDefault(false)
|
||||
{
|
||||
Colour = Color4.Black
|
||||
};
|
||||
|
||||
protected IntroScreen([CanBeNull] Func<MainMenu> createNextScreen = null)
|
||||
{
|
||||
this.createNextScreen = createNextScreen;
|
||||
@ -201,6 +206,8 @@ namespace osu.Game.Screens.Menu
|
||||
{
|
||||
this.FadeIn(300);
|
||||
|
||||
ApplyToBackground(b => b.FadeColour(Color4.Black));
|
||||
|
||||
double fadeOutTime = exit_delay;
|
||||
|
||||
var track = musicController.CurrentTrack;
|
||||
@ -243,13 +250,22 @@ namespace osu.Game.Screens.Menu
|
||||
base.OnResuming(e);
|
||||
}
|
||||
|
||||
private bool backgroundFaded;
|
||||
|
||||
protected void FadeInBackground(float fadeInTime)
|
||||
{
|
||||
backgroundFaded = true;
|
||||
ApplyToBackground(b => b.FadeColour(Color4.White, fadeInTime));
|
||||
}
|
||||
|
||||
public override void OnSuspending(ScreenTransitionEvent e)
|
||||
{
|
||||
base.OnSuspending(e);
|
||||
initialBeatmap = null;
|
||||
}
|
||||
|
||||
protected override BackgroundScreen CreateBackground() => new BackgroundScreenBlack();
|
||||
if (!backgroundFaded)
|
||||
FadeInBackground(200);
|
||||
}
|
||||
|
||||
protected virtual void StartTrack()
|
||||
{
|
||||
|
Reference in New Issue
Block a user