diff --git a/osu.Game/Screens/Loader.cs b/osu.Game/Screens/Loader.cs
index 3afaa02824..ca541ea552 100644
--- a/osu.Game/Screens/Loader.cs
+++ b/osu.Game/Screens/Loader.cs
@@ -24,7 +24,6 @@ namespace osu.Game.Screens
{
base.LogoArriving(logo, resuming);
- logo.RelativePositionAxes = Axes.None;
logo.Triangles = false;
logo.Origin = Anchor.BottomRight;
logo.Anchor = Anchor.BottomRight;
@@ -47,11 +46,7 @@ namespace osu.Game.Screens
protected override void LogoSuspending(OsuLogo logo)
{
base.LogoSuspending(logo);
- logo.FadeOut(100).OnComplete(l =>
- {
- l.Anchor = Anchor.TopLeft;
- l.Origin = Anchor.Centre;
- });
+ logo.FadeOut(100);
}
[BackgroundDependencyLoader]
diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs
index 0445733b23..0cb343c1ac 100644
--- a/osu.Game/Screens/Menu/Intro.cs
+++ b/osu.Game/Screens/Menu/Intro.cs
@@ -127,8 +127,6 @@ namespace osu.Game.Screens.Menu
if (!resuming)
{
- logo.Triangles = true;
-
logo.ScaleTo(1);
logo.FadeIn();
logo.PlayIntro();
diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs
index b0170edfe1..90f68ba9f1 100644
--- a/osu.Game/Screens/Menu/MainMenu.cs
+++ b/osu.Game/Screens/Menu/MainMenu.cs
@@ -112,9 +112,6 @@ namespace osu.Game.Screens.Menu
buttons.SetOsuLogo(logo);
- logo.Triangles = true;
- logo.Ripple = false;
-
logo.FadeColour(Color4.White, 100, Easing.OutQuint);
logo.FadeIn(100, Easing.OutQuint);
diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs
index dccb910d86..fb8e755b61 100644
--- a/osu.Game/Screens/Menu/OsuLogo.cs
+++ b/osu.Game/Screens/Menu/OsuLogo.cs
@@ -221,6 +221,30 @@ namespace osu.Game.Screens.Menu
};
}
+ ///
+ /// Schedule a new extenral animation. Handled queueing and finishing previous animations in a sane way.
+ ///
+ /// The animation to be performed
+ /// If true, the new animation is delayed until all previous transforms finish. If false, existing transformed are cleared.
+ internal void AppendAnimatingAction(Action action, bool waitForPrevious)
+ {
+ Action runnableAction = () =>
+ {
+ if (waitForPrevious)
+ this.DelayUntilTransformsFinished().Schedule(action);
+ else
+ {
+ ClearTransforms();
+ action();
+ }
+ };
+
+ if (IsLoaded)
+ runnableAction();
+ else
+ Schedule(() => runnableAction());
+ }
+
[BackgroundDependencyLoader]
private void load(TextureStore textures, AudioManager audio)
{
diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs
index 25c159ed40..f5ff9ea036 100644
--- a/osu.Game/Screens/OsuScreen.cs
+++ b/osu.Game/Screens/OsuScreen.cs
@@ -76,7 +76,7 @@ namespace osu.Game.Screens
protected override void OnResuming(Screen last)
{
base.OnResuming(last);
- logo.DelayUntilTransformsFinished().Schedule(() => LogoArriving(logo, true));
+ logo.AppendAnimatingAction(() => LogoArriving(logo, true), true);
sampleExit?.Play();
}
@@ -118,11 +118,11 @@ namespace osu.Game.Screens
}
if ((logo = lastOsu?.logo) == null)
- LoadComponentAsync(logo = new OsuLogo(), AddInternal);
+ LoadComponentAsync(logo = new OsuLogo { Alpha = 0 }, AddInternal);
+
+ logo.AppendAnimatingAction(() => LogoArriving(logo, false), true);
base.OnEntering(last);
-
- logo.DelayUntilTransformsFinished().Schedule(() => LogoArriving(logo, false));
}
protected override bool OnExiting(Screen next)
@@ -155,12 +155,16 @@ namespace osu.Game.Screens
{
logo.Action = null;
logo.FadeOut(300, Easing.OutQuint);
+ logo.Anchor = Anchor.TopLeft;
+ logo.Origin = Anchor.Centre;
+ logo.RelativePositionAxes = Axes.None;
+ logo.Triangles = true;
+ logo.Ripple = true;
}
private void onExitingLogo()
{
- logo.ClearTransforms();
- LogoExiting(logo);
+ logo.AppendAnimatingAction(() => { LogoExiting(logo); }, false);
}
///
@@ -172,8 +176,7 @@ namespace osu.Game.Screens
private void onSuspendingLogo()
{
- logo.ClearTransforms();
- LogoSuspending(logo);
+ logo.AppendAnimatingAction(() => { LogoSuspending(logo); }, false);
}
///
diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs
index 53a2dcc41f..de67bef004 100644
--- a/osu.Game/Screens/Play/PlayerLoader.cs
+++ b/osu.Game/Screens/Play/PlayerLoader.cs
@@ -99,7 +99,6 @@ namespace osu.Game.Screens.Play
{
base.LogoArriving(logo, resuming);
- logo.ClearTransforms(targetMember: nameof(Position));
logo.RelativePositionAxes = Axes.Both;
logo.ScaleTo(new Vector2(0.15f), 300, Easing.In);
diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs
index 121a53f699..5500d06136 100644
--- a/osu.Game/Screens/Select/SongSelect.cs
+++ b/osu.Game/Screens/Select/SongSelect.cs
@@ -315,9 +315,7 @@ namespace osu.Game.Screens.Select
{
base.LogoArriving(logo, resuming);
- logo.ClearTransforms();
logo.RelativePositionAxes = Axes.Both;
-
Vector2 position = new Vector2(0.95f, 0.96f);
if (logo.Alpha > 0.8f)