From 6fa45aafc6e5099ea46790e9b5c0bb362116717e Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Wed, 4 Oct 2017 23:06:31 +0300 Subject: [PATCH 01/52] Basic logic --- osu.Game/Screens/Menu/Intro.cs | 24 +++---------- osu.Game/Screens/Menu/IntroSequence.cs | 48 ++++++++++++++++++++++++++ osu.Game/Tests/Visual/TestCaseIntro.cs | 43 +++++++++++++++++++++++ osu.Game/osu.Game.csproj | 2 ++ 4 files changed, 97 insertions(+), 20 deletions(-) create mode 100644 osu.Game/Screens/Menu/IntroSequence.cs create mode 100644 osu.Game/Tests/Visual/TestCaseIntro.cs diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 3aeef4bbc9..8be330bd32 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -14,13 +14,12 @@ using osu.Game.Beatmaps.IO; using osu.Game.Configuration; using osu.Game.Graphics.Containers; using osu.Game.Screens.Backgrounds; -using OpenTK.Graphics; namespace osu.Game.Screens.Menu { public class Intro : OsuScreen { - private readonly OsuLogo logo; + private readonly IntroSequence introSequence; private const string menu_music_beatmap_hash = "715a09144f885d746644c1983e285044"; @@ -46,18 +45,7 @@ namespace osu.Game.Screens.Menu new ParallaxContainer { ParallaxAmount = 0.01f, - Children = new Drawable[] - { - logo = new OsuLogo - { - Alpha = 0, - Triangles = false, - Blending = BlendingMode.Additive, - Interactive = false, - Colour = Color4.DarkGray, - Ripple = false - } - } + Child = introSequence = new IntroSequence(), } }; } @@ -122,14 +110,10 @@ namespace osu.Game.Screens.Menu { DidLoadMenu = true; Push(mainMenu); - }, 2300); + }, 3200); }, 600); - logo.ScaleTo(0.4f); - logo.FadeOut(); - - logo.ScaleTo(1, 4400, Easing.OutQuint); - logo.FadeIn(20000, Easing.OutQuint); + introSequence.Start(); } protected override void OnSuspending(Screen next) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs new file mode 100644 index 0000000000..c8a0d6f811 --- /dev/null +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -0,0 +1,48 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using OpenTK; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Game.Graphics.Sprites; + +namespace osu.Game.Screens.Menu +{ + public class IntroSequence : Container + { + private OsuSpriteText welcomeText; + + public IntroSequence() + { + RelativeSizeAxes = Axes.Both; + Children = new Drawable[] + { + welcomeText = new OsuSpriteText + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Text = "welcome", + Font = @"Exo2.0-Light", + TextSize = 50, + Alpha = 0, + } + }; + } + + public void Start() + { + welcomeText.FadeIn(1000); + welcomeText.TransformSpacingTo(new Vector2(20, 0), 3000, Easing.OutQuint); + } + + public void Restart() + { + FinishTransforms(true); + + welcomeText.Alpha = 0; + welcomeText.Spacing = Vector2.Zero; + + Start(); + } + } +} diff --git a/osu.Game/Tests/Visual/TestCaseIntro.cs b/osu.Game/Tests/Visual/TestCaseIntro.cs new file mode 100644 index 0000000000..3900afb1e7 --- /dev/null +++ b/osu.Game/Tests/Visual/TestCaseIntro.cs @@ -0,0 +1,43 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using OpenTK.Graphics; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Shapes; +using osu.Framework.Timing; +using osu.Game.Screens.Menu; + +namespace osu.Game.Tests.Visual +{ + internal class TestCaseIntro : OsuTestCase + { + private readonly IntroSequence intro; + + public TestCaseIntro() + { + var rateAdjustClock = new StopwatchClock(true); + var framedClock = new FramedClock(rateAdjustClock); + + framedClock.ProcessFrame(); + + Add(new Container + { + RelativeSizeAxes = Axes.Both, + Clock = framedClock, + Children = new Drawable[] + { + new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.Black, + }, + intro = new IntroSequence(), + } + }); + + AddStep(@"Restart", intro.Restart); + AddSliderStep("Playback speed", 0.0, 2.0, 1, v => rateAdjustClock.Rate = v); + } + } +} diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index c8e42a3ad3..f9c17a8cca 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -624,6 +624,7 @@ + @@ -746,6 +747,7 @@ + From cafacf20ffb86e4c7ab2ccca184de43c1b4d9590 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Thu, 5 Oct 2017 02:50:13 +0300 Subject: [PATCH 02/52] Add all the needed objects --- osu.Game/Screens/Menu/IntroSequence.cs | 267 ++++++++++++++++++++++++- 1 file changed, 258 insertions(+), 9 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index c8a0d6f811..8555e726e5 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -2,8 +2,12 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using OpenTK; +using OpenTK.Graphics; +using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Shapes; +using osu.Game.Graphics; using osu.Game.Graphics.Sprites; namespace osu.Game.Screens.Menu @@ -12,37 +16,282 @@ namespace osu.Game.Screens.Menu { private OsuSpriteText welcomeText; + private readonly Container barTopLeft; + private readonly Container barBottomLeft; + private readonly Container barTopRight; + private readonly Container barBottomRight; + + private readonly Ring smallRing; + private readonly Ring mediumRing; + private readonly Ring bigRing; + + private readonly Container backgroundFill; + private readonly Container foregroundFill; + + private readonly CircularContainer pinkCircle; + private readonly CircularContainer blueCircle; + private readonly CircularContainer yellowCircle; + private readonly CircularContainer purpleCircle; + public IntroSequence() { RelativeSizeAxes = Axes.Both; Children = new Drawable[] { - welcomeText = new OsuSpriteText + new CircularContainer { Anchor = Anchor.Centre, Origin = Anchor.Centre, - Text = "welcome", - Font = @"Exo2.0-Light", - TextSize = 50, - Alpha = 0, + Size = new Vector2(480), + Masking = true, + Children = new Drawable[] + { + mediumRing = new Ring(Color4.White.Opacity(80)), + barTopLeft = new Container + { + Origin = Anchor.CentreLeft, + Anchor = Anchor.Centre, + Size = new Vector2(100, 1.5f), + Position = new Vector2(-120, -120), + Rotation = 45, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(180), + } + }, + barTopRight = new Container + { + Origin = Anchor.CentreRight, + Anchor = Anchor.Centre, + Size = new Vector2(100, 1.5f), + Position = new Vector2(120, -120), + Rotation = -45, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(80), + } + }, + barBottomLeft = new Container + { + Origin = Anchor.CentreLeft, + Anchor = Anchor.Centre, + Size = new Vector2(100, 1.5f), + Position = new Vector2(-120, 120), + Rotation = -45, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(230), + } + }, + barBottomRight = new Container + { + Origin = Anchor.CentreRight, + Anchor = Anchor.Centre, + Size = new Vector2(100, 1.5f), + Position = new Vector2(120, 120), + Rotation = 45, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(130), + } + }, + smallRing = new Ring(Color4.White), + bigRing = new Ring(OsuColour.FromHex(@"B6C5E9")), + backgroundFill = new Container + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = OsuColour.FromHex(@"C6D8FF").Opacity(160), + } + }, + welcomeText = new OsuSpriteText + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Text = "welcome", + Font = @"Exo2.0-Light", + TextSize = 42, + }, + foregroundFill = new Container + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White, + } + }, + } + }, + purpleCircle = new CircularContainer + { + Anchor = Anchor.Centre, + Origin = Anchor.TopCentre, + Masking = true, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.Purple, + } + }, + yellowCircle = new CircularContainer + { + Anchor = Anchor.Centre, + Origin = Anchor.BottomCentre, + Masking = true, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.Yellow, + } + }, + blueCircle = new CircularContainer + { + Anchor = Anchor.Centre, + Origin = Anchor.CentreRight, + Masking = true, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.Blue, + } + }, + pinkCircle = new CircularContainer + { + Anchor = Anchor.Centre, + Origin = Anchor.CentreLeft, + Masking = true, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.Pink, + } } }; + + setDefaults(); } public void Start() { welcomeText.FadeIn(1000); welcomeText.TransformSpacingTo(new Vector2(20, 0), 3000, Easing.OutQuint); + + smallRing.Background.ResizeTo(50, 1000, Easing.OutQuint); + smallRing.Foreground.Delay(100).ResizeTo(52, 1000, Easing.OutQuint); + + mediumRing.Background.ResizeTo(100, 1000, Easing.OutQuint); + mediumRing.Foreground.Delay(100).ResizeTo(102, 1000, Easing.OutQuint); + + bigRing.Background.Delay(1500).ResizeTo(400, 1000, Easing.OutQuint); + bigRing.Foreground.Delay(1600).ResizeTo(402, 1000, Easing.OutQuint); + + backgroundFill.Delay(2500).ResizeHeightTo(250, 500, Easing.OutQuint); + backgroundFill.Delay(2500).RotateTo(-45, 500, Easing.OutQuint); + + foregroundFill.Delay(2500).ResizeWidthTo(500, 1000, Easing.OutQuint); + foregroundFill.Delay(2500).RotateTo(-90, 1000, Easing.OutQuint); + + yellowCircle.Delay(3500).MoveToY(-220, 1000); + yellowCircle.Delay(3500).RotateTo(-180, 1000); + yellowCircle.Delay(3500).ResizeTo(438, 1000); + + purpleCircle.Delay(3500).MoveToY(220, 1000); + purpleCircle.Delay(3500).RotateTo(-180, 1000); + purpleCircle.Delay(3500).ResizeTo(438, 1000); + + blueCircle.Delay(3500).MoveToX(-220, 1000); + blueCircle.Delay(3500).RotateTo(-180, 1000); + blueCircle.Delay(3500).ResizeTo(438, 1000); + + pinkCircle.Delay(3500).MoveToX(220, 1000); + pinkCircle.Delay(3500).RotateTo(-180, 1000); + pinkCircle.Delay(3500).ResizeTo(440, 1000); + } + + private void setDefaults() + { + welcomeText.Alpha = 0; + welcomeText.Spacing = Vector2.Zero; + + smallRing.Background.Size = smallRing.Foreground.Size = Vector2.Zero; + mediumRing.Background.Size = mediumRing.Foreground.Size = Vector2.Zero; + bigRing.Background.Size = bigRing.Foreground.Size = Vector2.Zero; + + backgroundFill.Rotation = 0; + backgroundFill.Size = new Vector2(500, 0); + + foregroundFill.Rotation = 0; + foregroundFill.Size = new Vector2(0, 500); + + yellowCircle.Position = new Vector2(0, -300); + yellowCircle.Size = Vector2.Zero; + yellowCircle.Rotation = 0; + + purpleCircle.Position = new Vector2(0, 300); + purpleCircle.Size = Vector2.Zero; + purpleCircle.Rotation = 0; + + blueCircle.Position = new Vector2(-300, 0); + blueCircle.Size = Vector2.Zero; + blueCircle.Rotation = 0; + + pinkCircle.Position = new Vector2(300, 0); + pinkCircle.Size = Vector2.Zero; + pinkCircle.Rotation = 0; } public void Restart() { FinishTransforms(true); - - welcomeText.Alpha = 0; - welcomeText.Spacing = Vector2.Zero; - + setDefaults(); Start(); } + + private class Ring : Container + { + public CircularContainer Background; + public CircularContainer Foreground; + + public Ring(Color4 ringColour) + { + Anchor = Anchor.Centre; + Origin = Anchor.Centre; + AutoSizeAxes = Axes.Both; + Children = new[] + { + Background = new CircularContainer + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Masking = true, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = ringColour, + } + }, + Foreground = new CircularContainer + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Masking = true, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.Black, + } + } + }; + } + } } } From f8830e1b7c0418b34d325edecccf10abccec4b65 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Thu, 5 Oct 2017 21:37:37 +0300 Subject: [PATCH 03/52] Animation adjustments --- osu.Game/Screens/Menu/Intro.cs | 7 +- osu.Game/Screens/Menu/IntroSequence.cs | 130 +++++++++++++++---------- 2 files changed, 82 insertions(+), 55 deletions(-) diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 8be330bd32..013b9a450d 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -45,7 +45,10 @@ namespace osu.Game.Screens.Menu new ParallaxContainer { ParallaxAmount = 0.01f, - Child = introSequence = new IntroSequence(), + Child = introSequence = new IntroSequence + { + Blending = BlendingMode.Additive, + }, } }; } @@ -110,7 +113,7 @@ namespace osu.Game.Screens.Menu { DidLoadMenu = true; Push(mainMenu); - }, 3200); + }, 3500); }, 600); introSequence.Start(); diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 8555e726e5..454ca6c839 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -16,6 +16,8 @@ namespace osu.Game.Screens.Menu { private OsuSpriteText welcomeText; + private readonly OsuLogo logo; + private readonly Container barTopLeft; private readonly Container barBottomLeft; private readonly Container barTopRight; @@ -42,7 +44,7 @@ namespace osu.Game.Screens.Menu { Anchor = Anchor.Centre, Origin = Anchor.Centre, - Size = new Vector2(480), + Size = new Vector2(460), Masking = true, Children = new Drawable[] { @@ -51,8 +53,6 @@ namespace osu.Game.Screens.Menu { Origin = Anchor.CentreLeft, Anchor = Anchor.Centre, - Size = new Vector2(100, 1.5f), - Position = new Vector2(-120, -120), Rotation = 45, Child = new Box { @@ -64,8 +64,6 @@ namespace osu.Game.Screens.Menu { Origin = Anchor.CentreRight, Anchor = Anchor.Centre, - Size = new Vector2(100, 1.5f), - Position = new Vector2(120, -120), Rotation = -45, Child = new Box { @@ -77,8 +75,6 @@ namespace osu.Game.Screens.Menu { Origin = Anchor.CentreLeft, Anchor = Anchor.Centre, - Size = new Vector2(100, 1.5f), - Position = new Vector2(-120, 120), Rotation = -45, Child = new Box { @@ -90,8 +86,6 @@ namespace osu.Game.Screens.Menu { Origin = Anchor.CentreRight, Anchor = Anchor.Centre, - Size = new Vector2(100, 1.5f), - Position = new Vector2(120, 120), Rotation = 45, Child = new Box { @@ -139,7 +133,7 @@ namespace osu.Game.Screens.Menu Child = new Box { RelativeSizeAxes = Axes.Both, - Colour = Color4.Purple, + Colour = OsuColour.FromHex(@"AA92FF"), } }, yellowCircle = new CircularContainer @@ -150,7 +144,7 @@ namespace osu.Game.Screens.Menu Child = new Box { RelativeSizeAxes = Axes.Both, - Colour = Color4.Yellow, + Colour = OsuColour.FromHex(@"FFD64C"), } }, blueCircle = new CircularContainer @@ -161,7 +155,7 @@ namespace osu.Game.Screens.Menu Child = new Box { RelativeSizeAxes = Axes.Both, - Colour = Color4.Blue, + Colour = OsuColour.FromHex(@"8FE5FE"), } }, pinkCircle = new CircularContainer @@ -172,9 +166,17 @@ namespace osu.Game.Screens.Menu Child = new Box { RelativeSizeAxes = Axes.Both, - Colour = Color4.Pink, + Colour = OsuColour.FromHex(@"e967a1"), } - } + }, + logo = new OsuLogo + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Ripple = false, + Interactive = false, + Blending = BlendingMode.Additive, + }, }; setDefaults(); @@ -182,71 +184,93 @@ namespace osu.Game.Screens.Menu public void Start() { - welcomeText.FadeIn(1000); - welcomeText.TransformSpacingTo(new Vector2(20, 0), 3000, Easing.OutQuint); + welcomeText.Delay(350).ScaleTo(1, 250, Easing.Out); + welcomeText.Delay(350).FadeIn(1000, Easing.Out); + welcomeText.Delay(350).TransformSpacingTo(new Vector2(20, 0), 1450, Easing.Out); - smallRing.Background.ResizeTo(50, 1000, Easing.OutQuint); - smallRing.Foreground.Delay(100).ResizeTo(52, 1000, Easing.OutQuint); + mediumRing.Background.ResizeTo(120, 500, Easing.InExpo); + mediumRing.Foreground.ResizeTo(80, 500, Easing.InQuint).Then().ResizeTo(124, 1000, Easing.OutQuint); - mediumRing.Background.ResizeTo(100, 1000, Easing.OutQuint); - mediumRing.Foreground.Delay(100).ResizeTo(102, 1000, Easing.OutQuint); + smallRing.Background.Delay(100).ResizeTo(45, 500, Easing.InExpo); + smallRing.Foreground.Delay(100).ResizeTo(35, 500, Easing.InQuint).Then().ResizeTo(49, 2000, Easing.OutQuint); - bigRing.Background.Delay(1500).ResizeTo(400, 1000, Easing.OutQuint); - bigRing.Foreground.Delay(1600).ResizeTo(402, 1000, Easing.OutQuint); + barTopLeft.Delay(500).FadeIn(); + barTopLeft.Delay(500).MoveTo(new Vector2(-120, -120), 900, Easing.OutQuint); + barTopLeft.Delay(600).ResizeWidthTo(0, 900, Easing.OutExpo); - backgroundFill.Delay(2500).ResizeHeightTo(250, 500, Easing.OutQuint); - backgroundFill.Delay(2500).RotateTo(-45, 500, Easing.OutQuint); + barTopRight.Delay(500).FadeIn(); + barTopRight.Delay(500).MoveTo(new Vector2(120, -120), 900, Easing.OutQuint); + barTopRight.Delay(600).ResizeWidthTo(0, 900, Easing.OutExpo); - foregroundFill.Delay(2500).ResizeWidthTo(500, 1000, Easing.OutQuint); - foregroundFill.Delay(2500).RotateTo(-90, 1000, Easing.OutQuint); + barBottomLeft.Delay(500).FadeIn(); + barBottomLeft.Delay(500).MoveTo(new Vector2(-120, 120), 900, Easing.OutQuint); + barBottomLeft.Delay(600).ResizeWidthTo(0, 900, Easing.OutExpo); - yellowCircle.Delay(3500).MoveToY(-220, 1000); - yellowCircle.Delay(3500).RotateTo(-180, 1000); - yellowCircle.Delay(3500).ResizeTo(438, 1000); + barBottomRight.Delay(500).FadeIn(); + barBottomRight.Delay(500).MoveTo(new Vector2(120, 120), 900, Easing.OutQuint); + barBottomRight.Delay(600).ResizeWidthTo(0, 900, Easing.OutExpo); - purpleCircle.Delay(3500).MoveToY(220, 1000); - purpleCircle.Delay(3500).RotateTo(-180, 1000); - purpleCircle.Delay(3500).ResizeTo(438, 1000); + bigRing.Background.Delay(1950).ResizeTo(400, 550, Easing.InOutQuint); + bigRing.Foreground.Delay(1950).ResizeTo(350, 450, Easing.InExpo).Then().ResizeTo(404, 500, Easing.OutExpo); - blueCircle.Delay(3500).MoveToX(-220, 1000); - blueCircle.Delay(3500).RotateTo(-180, 1000); - blueCircle.Delay(3500).ResizeTo(438, 1000); + backgroundFill.Delay(2317).ResizeHeightTo(450, 650, Easing.InOutQuint); + backgroundFill.Delay(2317).RotateTo(-90, 650, Easing.InOutQuint); - pinkCircle.Delay(3500).MoveToX(220, 1000); - pinkCircle.Delay(3500).RotateTo(-180, 1000); - pinkCircle.Delay(3500).ResizeTo(440, 1000); + foregroundFill.Delay(2350).ResizeWidthTo(500, 650, Easing.InOutQuint); + foregroundFill.Delay(2350).RotateTo(-90, 650, Easing.InOutQuint); + + yellowCircle.Delay(2383).MoveToY(-207, 617, Easing.InOutQuad); + yellowCircle.Delay(2383).RotateTo(-180, 617, Easing.InOutQuad); + yellowCircle.Delay(2383).ResizeTo(414, 617, Easing.InOutExpo); + + purpleCircle.Delay(2317).MoveToY(207, 683, Easing.InOutQuad); + purpleCircle.Delay(2317).RotateTo(-180, 683, Easing.InOutQuad); + purpleCircle.Delay(2317).ResizeTo(414, 683, Easing.InOutExpo); + + blueCircle.Delay(2449).MoveToX(-207, 551, Easing.InOutQuad); + blueCircle.Delay(2449).RotateTo(-180, 551, Easing.InOutQuad); + blueCircle.Delay(2449).ResizeTo(414, 551, Easing.InOutExpo); + + pinkCircle.Delay(2515).MoveToX(208, 485, Easing.InOutQuad); + pinkCircle.Delay(2515).RotateTo(-180, 485, Easing.InOutQuad); + pinkCircle.Delay(2515).ResizeTo(416, 485, Easing.InOutExpo); + + logo.Delay(3200).FadeIn(300); + + backgroundFill.Delay(3200).FadeOut(); + foregroundFill.Delay(3500).FadeOut(); } private void setDefaults() { - welcomeText.Alpha = 0; + logo.Alpha = 0; + + welcomeText.Scale = new Vector2(0.9f); welcomeText.Spacing = Vector2.Zero; + welcomeText.Alpha = 0; smallRing.Background.Size = smallRing.Foreground.Size = Vector2.Zero; mediumRing.Background.Size = mediumRing.Foreground.Size = Vector2.Zero; bigRing.Background.Size = bigRing.Foreground.Size = Vector2.Zero; - backgroundFill.Rotation = 0; - backgroundFill.Size = new Vector2(500, 0); + barTopLeft.Size = barTopRight.Size = barBottomLeft.Size = barBottomRight.Size = new Vector2(115, 1.5f); + barTopLeft.Alpha = barTopRight.Alpha = barBottomLeft.Alpha = barBottomRight.Alpha = 0; + barTopLeft.Position = new Vector2(-90, -90); + barTopRight.Position = new Vector2(90, -90); + barBottomLeft.Position = new Vector2(-90, 90); + barBottomRight.Position = new Vector2(90, 90); - foregroundFill.Rotation = 0; + backgroundFill.Rotation = foregroundFill.Rotation = 0; + backgroundFill.Alpha = foregroundFill.Alpha = 1; + backgroundFill.Size = new Vector2(500, 0); foregroundFill.Size = new Vector2(0, 500); + yellowCircle.Size = purpleCircle.Size = blueCircle.Size = pinkCircle.Size = Vector2.Zero; + yellowCircle.Rotation = purpleCircle.Rotation = blueCircle.Rotation = pinkCircle.Rotation = 0; yellowCircle.Position = new Vector2(0, -300); - yellowCircle.Size = Vector2.Zero; - yellowCircle.Rotation = 0; - purpleCircle.Position = new Vector2(0, 300); - purpleCircle.Size = Vector2.Zero; - purpleCircle.Rotation = 0; - blueCircle.Position = new Vector2(-300, 0); - blueCircle.Size = Vector2.Zero; - blueCircle.Rotation = 0; - pinkCircle.Position = new Vector2(300, 0); - pinkCircle.Size = Vector2.Zero; - pinkCircle.Rotation = 0; } public void Restart() From 59a0343c01398846bbacecdad8c950cd4e84baf8 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 01:36:40 +0300 Subject: [PATCH 04/52] CI fixes --- osu.Game/Screens/Menu/IntroSequence.cs | 6 +++--- osu.Game/Tests/Visual/TestCaseIntro.cs | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 454ca6c839..3824cb7c13 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -14,7 +14,7 @@ namespace osu.Game.Screens.Menu { public class IntroSequence : Container { - private OsuSpriteText welcomeText; + private readonly OsuSpriteText welcomeText; private readonly OsuLogo logo; @@ -282,8 +282,8 @@ namespace osu.Game.Screens.Menu private class Ring : Container { - public CircularContainer Background; - public CircularContainer Foreground; + public readonly CircularContainer Background; + public readonly CircularContainer Foreground; public Ring(Color4 ringColour) { diff --git a/osu.Game/Tests/Visual/TestCaseIntro.cs b/osu.Game/Tests/Visual/TestCaseIntro.cs index 3900afb1e7..d803caf2b0 100644 --- a/osu.Game/Tests/Visual/TestCaseIntro.cs +++ b/osu.Game/Tests/Visual/TestCaseIntro.cs @@ -12,13 +12,12 @@ namespace osu.Game.Tests.Visual { internal class TestCaseIntro : OsuTestCase { - private readonly IntroSequence intro; - public TestCaseIntro() { + IntroSequence intro; + var rateAdjustClock = new StopwatchClock(true); var framedClock = new FramedClock(rateAdjustClock); - framedClock.ProcessFrame(); Add(new Container From e2d6659d48d3aafc79babc90bd03c3ee90de4836 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 03:57:15 +0300 Subject: [PATCH 05/52] Change Ring type, use RelativeSizeAxes for Background/Foreground --- osu.Game/Screens/Menu/IntroSequence.cs | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 3824cb7c13..e60f109cc3 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -99,6 +99,7 @@ namespace osu.Game.Screens.Menu { Anchor = Anchor.Centre, Origin = Anchor.Centre, + RelativeSizeAxes = Axes.Both, Child = new Box { RelativeSizeAxes = Axes.Both, @@ -117,6 +118,7 @@ namespace osu.Game.Screens.Menu { Anchor = Anchor.Centre, Origin = Anchor.Centre, + RelativeSizeAxes = Axes.Both, Child = new Box { RelativeSizeAxes = Axes.Both, @@ -189,10 +191,10 @@ namespace osu.Game.Screens.Menu welcomeText.Delay(350).TransformSpacingTo(new Vector2(20, 0), 1450, Easing.Out); mediumRing.Background.ResizeTo(120, 500, Easing.InExpo); - mediumRing.Foreground.ResizeTo(80, 500, Easing.InQuint).Then().ResizeTo(124, 1000, Easing.OutQuint); + mediumRing.Foreground.ResizeTo(0.8f, 500, Easing.InQuint).Then().ResizeTo(1, 1000, Easing.OutQuint); smallRing.Background.Delay(100).ResizeTo(45, 500, Easing.InExpo); - smallRing.Foreground.Delay(100).ResizeTo(35, 500, Easing.InQuint).Then().ResizeTo(49, 2000, Easing.OutQuint); + smallRing.Foreground.Delay(100).ResizeTo(0.8f, 500, Easing.InQuint).Then().ResizeTo(1, 2000, Easing.OutQuint); barTopLeft.Delay(500).FadeIn(); barTopLeft.Delay(500).MoveTo(new Vector2(-120, -120), 900, Easing.OutQuint); @@ -211,12 +213,12 @@ namespace osu.Game.Screens.Menu barBottomRight.Delay(600).ResizeWidthTo(0, 900, Easing.OutExpo); bigRing.Background.Delay(1950).ResizeTo(400, 550, Easing.InOutQuint); - bigRing.Foreground.Delay(1950).ResizeTo(350, 450, Easing.InExpo).Then().ResizeTo(404, 500, Easing.OutExpo); + bigRing.Foreground.Delay(1950).ResizeTo(0.8f, 450, Easing.InExpo).Then().ResizeTo(1, 500, Easing.OutExpo); - backgroundFill.Delay(2317).ResizeHeightTo(450, 650, Easing.InOutQuint); + backgroundFill.Delay(2317).ResizeHeightTo(1, 650, Easing.InOutQuint); backgroundFill.Delay(2317).RotateTo(-90, 650, Easing.InOutQuint); - foregroundFill.Delay(2350).ResizeWidthTo(500, 650, Easing.InOutQuint); + foregroundFill.Delay(2350).ResizeWidthTo(1, 650, Easing.InOutQuint); foregroundFill.Delay(2350).RotateTo(-90, 650, Easing.InOutQuint); yellowCircle.Delay(2383).MoveToY(-207, 617, Easing.InOutQuad); @@ -262,8 +264,7 @@ namespace osu.Game.Screens.Menu backgroundFill.Rotation = foregroundFill.Rotation = 0; backgroundFill.Alpha = foregroundFill.Alpha = 1; - backgroundFill.Size = new Vector2(500, 0); - foregroundFill.Size = new Vector2(0, 500); + backgroundFill.Height = foregroundFill.Width = 0; yellowCircle.Size = purpleCircle.Size = blueCircle.Size = pinkCircle.Size = Vector2.Zero; yellowCircle.Rotation = purpleCircle.Rotation = blueCircle.Rotation = pinkCircle.Rotation = 0; @@ -280,9 +281,9 @@ namespace osu.Game.Screens.Menu Start(); } - private class Ring : Container + private class Ring : CircularContainer { - public readonly CircularContainer Background; + public readonly Container Background; public readonly CircularContainer Foreground; public Ring(Color4 ringColour) @@ -290,13 +291,13 @@ namespace osu.Game.Screens.Menu Anchor = Anchor.Centre; Origin = Anchor.Centre; AutoSizeAxes = Axes.Both; + Masking = true; Children = new[] { - Background = new CircularContainer + Background = new Container { Anchor = Anchor.Centre, Origin = Anchor.Centre, - Masking = true, Child = new Box { RelativeSizeAxes = Axes.Both, @@ -307,6 +308,7 @@ namespace osu.Game.Screens.Menu { Anchor = Anchor.Centre, Origin = Anchor.Centre, + RelativeSizeAxes = Axes.Both, Masking = true, Child = new Box { From 19723b82f781839b27b6d8f8ecf5250c6c244fd1 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 04:12:01 +0300 Subject: [PATCH 06/52] Remove ring's background field and adjust some timings --- osu.Game/Screens/Menu/IntroSequence.cs | 56 ++++++++++++-------------- 1 file changed, 25 insertions(+), 31 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index e60f109cc3..a2a75f6a52 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -190,29 +190,29 @@ namespace osu.Game.Screens.Menu welcomeText.Delay(350).FadeIn(1000, Easing.Out); welcomeText.Delay(350).TransformSpacingTo(new Vector2(20, 0), 1450, Easing.Out); - mediumRing.Background.ResizeTo(120, 500, Easing.InExpo); - mediumRing.Foreground.ResizeTo(0.8f, 500, Easing.InQuint).Then().ResizeTo(1, 1000, Easing.OutQuint); + mediumRing.ResizeTo(120, 500, Easing.InExpo); + mediumRing.Foreground.Delay(620).ResizeTo(1, 1000, Easing.OutQuint); - smallRing.Background.Delay(100).ResizeTo(45, 500, Easing.InExpo); - smallRing.Foreground.Delay(100).ResizeTo(0.8f, 500, Easing.InQuint).Then().ResizeTo(1, 2000, Easing.OutQuint); + smallRing.Delay(200).ResizeTo(45, 500, Easing.InExpo); + smallRing.Foreground.Delay(700).ResizeTo(1, 2000, Easing.OutQuint); - barTopLeft.Delay(500).FadeIn(); - barTopLeft.Delay(500).MoveTo(new Vector2(-120, -120), 900, Easing.OutQuint); - barTopLeft.Delay(600).ResizeWidthTo(0, 900, Easing.OutExpo); + barTopLeft.Delay(700).FadeIn(); + barTopLeft.Delay(700).MoveTo(new Vector2(-120, -120), 900, Easing.OutQuint); + barTopLeft.Delay(800).ResizeWidthTo(0, 900, Easing.OutExpo); - barTopRight.Delay(500).FadeIn(); - barTopRight.Delay(500).MoveTo(new Vector2(120, -120), 900, Easing.OutQuint); - barTopRight.Delay(600).ResizeWidthTo(0, 900, Easing.OutExpo); + barTopRight.Delay(700).FadeIn(); + barTopRight.Delay(700).MoveTo(new Vector2(120, -120), 900, Easing.OutQuint); + barTopRight.Delay(800).ResizeWidthTo(0, 900, Easing.OutExpo); - barBottomLeft.Delay(500).FadeIn(); - barBottomLeft.Delay(500).MoveTo(new Vector2(-120, 120), 900, Easing.OutQuint); - barBottomLeft.Delay(600).ResizeWidthTo(0, 900, Easing.OutExpo); + barBottomLeft.Delay(700).FadeIn(); + barBottomLeft.Delay(700).MoveTo(new Vector2(-120, 120), 900, Easing.OutQuint); + barBottomLeft.Delay(800).ResizeWidthTo(0, 900, Easing.OutExpo); - barBottomRight.Delay(500).FadeIn(); - barBottomRight.Delay(500).MoveTo(new Vector2(120, 120), 900, Easing.OutQuint); - barBottomRight.Delay(600).ResizeWidthTo(0, 900, Easing.OutExpo); + barBottomRight.Delay(700).FadeIn(); + barBottomRight.Delay(700).MoveTo(new Vector2(120, 120), 900, Easing.OutQuint); + barBottomRight.Delay(800).ResizeWidthTo(0, 900, Easing.OutExpo); - bigRing.Background.Delay(1950).ResizeTo(400, 550, Easing.InOutQuint); + bigRing.Delay(1950).ResizeTo(400, 550, Easing.InOutQuint); bigRing.Foreground.Delay(1950).ResizeTo(0.8f, 450, Easing.InExpo).Then().ResizeTo(1, 500, Easing.OutExpo); backgroundFill.Delay(2317).ResizeHeightTo(1, 650, Easing.InOutQuint); @@ -251,9 +251,10 @@ namespace osu.Game.Screens.Menu welcomeText.Spacing = Vector2.Zero; welcomeText.Alpha = 0; - smallRing.Background.Size = smallRing.Foreground.Size = Vector2.Zero; - mediumRing.Background.Size = mediumRing.Foreground.Size = Vector2.Zero; - bigRing.Background.Size = bigRing.Foreground.Size = Vector2.Zero; + smallRing.Size = mediumRing.Size = bigRing.Size = Vector2.Zero; + mediumRing.Foreground.Size = new Vector2(0.8f); + smallRing.Foreground.Size = new Vector2(0.7f); + bigRing.Foreground.Size = Vector2.Zero; barTopLeft.Size = barTopRight.Size = barBottomLeft.Size = barBottomRight.Size = new Vector2(115, 1.5f); barTopLeft.Alpha = barTopRight.Alpha = barBottomLeft.Alpha = barBottomRight.Alpha = 0; @@ -283,26 +284,19 @@ namespace osu.Game.Screens.Menu private class Ring : CircularContainer { - public readonly Container Background; public readonly CircularContainer Foreground; public Ring(Color4 ringColour) { Anchor = Anchor.Centre; Origin = Anchor.Centre; - AutoSizeAxes = Axes.Both; Masking = true; - Children = new[] + Children = new Drawable[] { - Background = new Container + new Box { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = ringColour, - } + RelativeSizeAxes = Axes.Both, + Colour = ringColour, }, Foreground = new CircularContainer { From 6fb8755a95df6c6af6f3f2790243aa5d3297c52e Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 06:06:09 +0300 Subject: [PATCH 07/52] Use less masking for the ring --- osu.Game/Screens/Menu/IntroSequence.cs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index a2a75f6a52..8bff3b8aea 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -282,7 +282,7 @@ namespace osu.Game.Screens.Menu Start(); } - private class Ring : CircularContainer + private class Ring : Container { public readonly CircularContainer Foreground; @@ -290,13 +290,19 @@ namespace osu.Game.Screens.Menu { Anchor = Anchor.Centre; Origin = Anchor.Centre; - Masking = true; - Children = new Drawable[] + Children = new[] { - new Box + new CircularContainer { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, - Colour = ringColour, + Masking = true, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = ringColour, + } }, Foreground = new CircularContainer { From 9cad0ce2e9bc0c72ef4491eceb8557c6d56d6a18 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 07:07:09 +0300 Subject: [PATCH 08/52] Group transforms using delayed sequence And some timing adjustments --- osu.Game/Screens/Menu/IntroSequence.cs | 199 ++++++++++++++----------- 1 file changed, 116 insertions(+), 83 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 8bff3b8aea..1aac7c7728 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -18,6 +18,8 @@ namespace osu.Game.Screens.Menu private readonly OsuLogo logo; + private readonly Container barsContainer; + private readonly Container barTopLeft; private readonly Container barBottomLeft; private readonly Container barTopRight; @@ -49,48 +51,57 @@ namespace osu.Game.Screens.Menu Children = new Drawable[] { mediumRing = new Ring(Color4.White.Opacity(80)), - barTopLeft = new Container + barsContainer = new Container { - Origin = Anchor.CentreLeft, Anchor = Anchor.Centre, - Rotation = 45, - Child = new Box + Origin = Anchor.Centre, + AutoSizeAxes = Axes.Both, + Children = new Drawable[] { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(180), - } - }, - barTopRight = new Container - { - Origin = Anchor.CentreRight, - Anchor = Anchor.Centre, - Rotation = -45, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(80), - } - }, - barBottomLeft = new Container - { - Origin = Anchor.CentreLeft, - Anchor = Anchor.Centre, - Rotation = -45, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(230), - } - }, - barBottomRight = new Container - { - Origin = Anchor.CentreRight, - Anchor = Anchor.Centre, - Rotation = 45, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(130), + barTopLeft = new Container + { + Origin = Anchor.CentreLeft, + Anchor = Anchor.Centre, + Rotation = 45, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(180), + } + }, + barTopRight = new Container + { + Origin = Anchor.CentreRight, + Anchor = Anchor.Centre, + Rotation = -45, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(80), + } + }, + barBottomLeft = new Container + { + Origin = Anchor.CentreLeft, + Anchor = Anchor.Centre, + Rotation = -45, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(230), + } + }, + barBottomRight = new Container + { + Origin = Anchor.CentreRight, + Anchor = Anchor.Centre, + Rotation = 45, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(130), + } + }, } }, smallRing = new Ring(Color4.White), @@ -186,56 +197,78 @@ namespace osu.Game.Screens.Menu public void Start() { - welcomeText.Delay(350).ScaleTo(1, 250, Easing.Out); - welcomeText.Delay(350).FadeIn(1000, Easing.Out); - welcomeText.Delay(350).TransformSpacingTo(new Vector2(20, 0), 1450, Easing.Out); + mediumRing.ResizeTo(130, 500, Easing.InExpo); + mediumRing.Foreground.Delay(500).ResizeTo(1, 1000, Easing.OutQuint); - mediumRing.ResizeTo(120, 500, Easing.InExpo); - mediumRing.Foreground.Delay(620).ResizeTo(1, 1000, Easing.OutQuint); + using (welcomeText.BeginDelayedSequence(350)) + { + welcomeText.ScaleTo(1, 250, Easing.Out); + welcomeText.FadeIn(1000, Easing.Out); + welcomeText.TransformSpacingTo(new Vector2(20, 0), 1450, Easing.Out); + } - smallRing.Delay(200).ResizeTo(45, 500, Easing.InExpo); - smallRing.Foreground.Delay(700).ResizeTo(1, 2000, Easing.OutQuint); + using (smallRing.BeginDelayedSequence(200)) + { + smallRing.ResizeTo(40, 400, Easing.InExpo); + smallRing.Foreground.Delay(400).ResizeTo(1, 1500, Easing.OutQuint); + } - barTopLeft.Delay(700).FadeIn(); - barTopLeft.Delay(700).MoveTo(new Vector2(-120, -120), 900, Easing.OutQuint); - barTopLeft.Delay(800).ResizeWidthTo(0, 900, Easing.OutExpo); + using (barsContainer.BeginDelayedSequence(500, true)) + { + foreach (var bar in barsContainer) + { + bar.FadeIn(); + bar.Delay(100).ResizeWidthTo(0, 900, Easing.OutExpo); + } - barTopRight.Delay(700).FadeIn(); - barTopRight.Delay(700).MoveTo(new Vector2(120, -120), 900, Easing.OutQuint); - barTopRight.Delay(800).ResizeWidthTo(0, 900, Easing.OutExpo); - - barBottomLeft.Delay(700).FadeIn(); - barBottomLeft.Delay(700).MoveTo(new Vector2(-120, 120), 900, Easing.OutQuint); - barBottomLeft.Delay(800).ResizeWidthTo(0, 900, Easing.OutExpo); - - barBottomRight.Delay(700).FadeIn(); - barBottomRight.Delay(700).MoveTo(new Vector2(120, 120), 900, Easing.OutQuint); - barBottomRight.Delay(800).ResizeWidthTo(0, 900, Easing.OutExpo); + barTopLeft.MoveTo(new Vector2(-120, -120), 900, Easing.OutQuint); + barTopRight.MoveTo(new Vector2(120, -120), 900, Easing.OutQuint); + barBottomLeft.MoveTo(new Vector2(-120, 120), 900, Easing.OutQuint); + barBottomRight.MoveTo(new Vector2(120, 120), 900, Easing.OutQuint); + } bigRing.Delay(1950).ResizeTo(400, 550, Easing.InOutQuint); bigRing.Foreground.Delay(1950).ResizeTo(0.8f, 450, Easing.InExpo).Then().ResizeTo(1, 500, Easing.OutExpo); - backgroundFill.Delay(2317).ResizeHeightTo(1, 650, Easing.InOutQuint); - backgroundFill.Delay(2317).RotateTo(-90, 650, Easing.InOutQuint); + using (backgroundFill.BeginDelayedSequence(2317)) + { + backgroundFill.ResizeHeightTo(1, 650, Easing.InOutQuint); + backgroundFill.RotateTo(-90, 650, Easing.InOutQuint); + } - foregroundFill.Delay(2350).ResizeWidthTo(1, 650, Easing.InOutQuint); - foregroundFill.Delay(2350).RotateTo(-90, 650, Easing.InOutQuint); + using (foregroundFill.BeginDelayedSequence(2350)) + { + foregroundFill.ResizeWidthTo(1, 650, Easing.InOutQuint); + foregroundFill.RotateTo(-90, 650, Easing.InOutQuint); + } - yellowCircle.Delay(2383).MoveToY(-207, 617, Easing.InOutQuad); - yellowCircle.Delay(2383).RotateTo(-180, 617, Easing.InOutQuad); - yellowCircle.Delay(2383).ResizeTo(414, 617, Easing.InOutExpo); + using (yellowCircle.BeginDelayedSequence(2383)) + { + yellowCircle.MoveToY(-207, 617, Easing.InOutQuad); + yellowCircle.RotateTo(-180, 617, Easing.InOutQuad); + yellowCircle.ResizeTo(414, 617, Easing.InOutSine); + } - purpleCircle.Delay(2317).MoveToY(207, 683, Easing.InOutQuad); - purpleCircle.Delay(2317).RotateTo(-180, 683, Easing.InOutQuad); - purpleCircle.Delay(2317).ResizeTo(414, 683, Easing.InOutExpo); + using (purpleCircle.BeginDelayedSequence(2317)) + { + purpleCircle.MoveToY(207, 683, Easing.InOutQuad); + purpleCircle.RotateTo(-180, 683, Easing.InOutQuad); + purpleCircle.ResizeTo(414, 683, Easing.InOutSine); + } - blueCircle.Delay(2449).MoveToX(-207, 551, Easing.InOutQuad); - blueCircle.Delay(2449).RotateTo(-180, 551, Easing.InOutQuad); - blueCircle.Delay(2449).ResizeTo(414, 551, Easing.InOutExpo); + using (blueCircle.BeginDelayedSequence(2449)) + { + blueCircle.MoveToX(-207, 551, Easing.InOutQuad); + blueCircle.RotateTo(-180, 551, Easing.InOutQuad); + blueCircle.ResizeTo(414, 551, Easing.InOutSine); + } - pinkCircle.Delay(2515).MoveToX(208, 485, Easing.InOutQuad); - pinkCircle.Delay(2515).RotateTo(-180, 485, Easing.InOutQuad); - pinkCircle.Delay(2515).ResizeTo(416, 485, Easing.InOutExpo); + using (pinkCircle.BeginDelayedSequence(2515)) + { + pinkCircle.MoveToX(208, 485, Easing.InOutQuad); + pinkCircle.RotateTo(-180, 485, Easing.InOutQuad); + pinkCircle.ResizeTo(416, 485, Easing.InOutSine); + } logo.Delay(3200).FadeIn(300); @@ -252,11 +285,11 @@ namespace osu.Game.Screens.Menu welcomeText.Alpha = 0; smallRing.Size = mediumRing.Size = bigRing.Size = Vector2.Zero; - mediumRing.Foreground.Size = new Vector2(0.8f); - smallRing.Foreground.Size = new Vector2(0.7f); + mediumRing.Foreground.Size = new Vector2(0.75f); + smallRing.Foreground.Size = new Vector2(0.5f); bigRing.Foreground.Size = Vector2.Zero; - barTopLeft.Size = barTopRight.Size = barBottomLeft.Size = barBottomRight.Size = new Vector2(115, 1.5f); + barTopLeft.Size = barTopRight.Size = barBottomLeft.Size = barBottomRight.Size = new Vector2(110, 1.5f); barTopLeft.Alpha = barTopRight.Alpha = barBottomLeft.Alpha = barBottomRight.Alpha = 0; barTopLeft.Position = new Vector2(-90, -90); barTopRight.Position = new Vector2(90, -90); @@ -269,10 +302,10 @@ namespace osu.Game.Screens.Menu yellowCircle.Size = purpleCircle.Size = blueCircle.Size = pinkCircle.Size = Vector2.Zero; yellowCircle.Rotation = purpleCircle.Rotation = blueCircle.Rotation = pinkCircle.Rotation = 0; - yellowCircle.Position = new Vector2(0, -300); - purpleCircle.Position = new Vector2(0, 300); - blueCircle.Position = new Vector2(-300, 0); - pinkCircle.Position = new Vector2(300, 0); + yellowCircle.Position = new Vector2(0, -250); + purpleCircle.Position = new Vector2(0, 250); + blueCircle.Position = new Vector2(-250, 0); + pinkCircle.Position = new Vector2(250, 0); } public void Restart() From ac7cabf5e6f6fc20a28379ec8d596abcb99dcd0e Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 14:26:54 +0300 Subject: [PATCH 09/52] Framework update --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index ef889b4ec7..81c9517d04 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit ef889b4ec7e6175d52d64411c15f4f195fd16209 +Subproject commit 81c9517d04196866c363a68ba2d20b9bb8300a7b From 67a6da44f91363fbd6b01b8d073a49fb3dd67416 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 15:02:43 +0300 Subject: [PATCH 10/52] Rings timing adjustment --- osu.Game/Screens/Menu/IntroSequence.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 1aac7c7728..9b588f168f 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -207,7 +207,7 @@ namespace osu.Game.Screens.Menu welcomeText.TransformSpacingTo(new Vector2(20, 0), 1450, Easing.Out); } - using (smallRing.BeginDelayedSequence(200)) + using (smallRing.BeginDelayedSequence(200, true)) { smallRing.ResizeTo(40, 400, Easing.InExpo); smallRing.Foreground.Delay(400).ResizeTo(1, 1500, Easing.OutQuint); @@ -227,8 +227,11 @@ namespace osu.Game.Screens.Menu barBottomRight.MoveTo(new Vector2(120, 120), 900, Easing.OutQuint); } - bigRing.Delay(1950).ResizeTo(400, 550, Easing.InOutQuint); - bigRing.Foreground.Delay(1950).ResizeTo(0.8f, 450, Easing.InExpo).Then().ResizeTo(1, 500, Easing.OutExpo); + using (bigRing.BeginDelayedSequence(1950, true)) + { + bigRing.ResizeTo(400, 550, Easing.OutQuint); + bigRing.Foreground.ResizeTo(1, 700, Easing.InOutQuad); + } using (backgroundFill.BeginDelayedSequence(2317)) { From c34b9aef98d7d3089998ec8299f70dca0e9398ff Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 15:29:29 +0300 Subject: [PATCH 11/52] No need to put a lot of stuff inside the big circular container --- osu.Game/Screens/Menu/IntroSequence.cs | 112 ++++++++++++------------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 9b588f168f..d5355cf4ca 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -42,6 +42,62 @@ namespace osu.Game.Screens.Menu RelativeSizeAxes = Axes.Both; Children = new Drawable[] { + mediumRing = new Ring(Color4.White.Opacity(80)), + barsContainer = new Container + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + AutoSizeAxes = Axes.Both, + Children = new Drawable[] + { + barTopLeft = new Container + { + Origin = Anchor.CentreLeft, + Anchor = Anchor.Centre, + Rotation = 45, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(180), + } + }, + barTopRight = new Container + { + Origin = Anchor.CentreRight, + Anchor = Anchor.Centre, + Rotation = -45, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(80), + } + }, + barBottomLeft = new Container + { + Origin = Anchor.CentreLeft, + Anchor = Anchor.Centre, + Rotation = -45, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(230), + } + }, + barBottomRight = new Container + { + Origin = Anchor.CentreRight, + Anchor = Anchor.Centre, + Rotation = 45, + Child = new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.White.Opacity(130), + } + }, + } + }, + smallRing = new Ring(Color4.White), + bigRing = new Ring(OsuColour.FromHex(@"B6C5E9")), new CircularContainer { Anchor = Anchor.Centre, @@ -50,62 +106,6 @@ namespace osu.Game.Screens.Menu Masking = true, Children = new Drawable[] { - mediumRing = new Ring(Color4.White.Opacity(80)), - barsContainer = new Container - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - AutoSizeAxes = Axes.Both, - Children = new Drawable[] - { - barTopLeft = new Container - { - Origin = Anchor.CentreLeft, - Anchor = Anchor.Centre, - Rotation = 45, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(180), - } - }, - barTopRight = new Container - { - Origin = Anchor.CentreRight, - Anchor = Anchor.Centre, - Rotation = -45, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(80), - } - }, - barBottomLeft = new Container - { - Origin = Anchor.CentreLeft, - Anchor = Anchor.Centre, - Rotation = -45, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(230), - } - }, - barBottomRight = new Container - { - Origin = Anchor.CentreRight, - Anchor = Anchor.Centre, - Rotation = 45, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(130), - } - }, - } - }, - smallRing = new Ring(Color4.White), - bigRing = new Ring(OsuColour.FromHex(@"B6C5E9")), backgroundFill = new Container { Anchor = Anchor.Centre, From 10a3f7c1d025d420752f36cf2429e101e223f342 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 18:30:46 +0300 Subject: [PATCH 12/52] Use constants instead of magic numbers --- osu.Game/Screens/Menu/IntroSequence.cs | 161 +++++++++++++++++-------- 1 file changed, 110 insertions(+), 51 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index d5355cf4ca..8b91671734 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -14,6 +14,56 @@ namespace osu.Game.Screens.Menu { public class IntroSequence : Container { + //Size + private const int logo_size = 460; + + private const int small_ring_size = 40; + private const int medium_ring_size = 130; + private const int big_ring_size = 400; + + private static readonly Vector2 medium_ring_thickness = new Vector2(0.25f); + private static readonly Vector2 small_ring_thickness = new Vector2(0.5f); + + private static readonly Vector2 bar_size = new Vector2(110, 1.5f); + + private const int colored_circle_size = 416; + + //Time + private const int full_animation_duration = 3000; + + private const int medium_ring_resize_duration = 500; + private const int medium_ring_fade_duration = 1000; + + private const int small_ring_animation_start_delay = 200; + private const int small_ring_resize_duration = 400; + private const int small_ring_fade_duration = 1500; + + private const int text_appear_delay = 350; + private const int text_scale_duration = 250; + private const int text_fade_duration = 1000; + private const int text_spacing_transform_duration = 1450; + + private const int bar_animation_duration = 1000; + private const int bar_resize_delay = 300; + + private const int big_ring_animation_start_delay = 1950; + private const int big_ring_resize_duration = 550; + private const int big_ring_fade_duration = 700; + + private const int background_animation_start_time = 2317; + private const int foreground_animation_start_time = 2350; + + private const int colored_curcle_rotation_delay = 100; + private const int purple_circle_animation_start_time = 2317; + private const int yellow_circle_animation_start_time = 2383; + private const int blue_circle_animation_start_time = 2449; + private const int pink_circle_animation_start_time = 2515; + + //Position + private const int bar_start_offset = 90; + private const int bar_end_offset = 120; + private const int colored_circle_offset = 250; + private readonly OsuSpriteText welcomeText; private readonly OsuLogo logo; @@ -102,7 +152,7 @@ namespace osu.Game.Screens.Menu { Anchor = Anchor.Centre, Origin = Anchor.Centre, - Size = new Vector2(460), + Size = new Vector2(logo_size), Masking = true, Children = new Drawable[] { @@ -197,80 +247,89 @@ namespace osu.Game.Screens.Menu public void Start() { - mediumRing.ResizeTo(130, 500, Easing.InExpo); - mediumRing.Foreground.Delay(500).ResizeTo(1, 1000, Easing.OutQuint); + int duration; - using (welcomeText.BeginDelayedSequence(350)) + mediumRing.ResizeTo(medium_ring_size, medium_ring_resize_duration, Easing.InExpo); + mediumRing.Foreground.Delay(medium_ring_resize_duration).ResizeTo(1, medium_ring_fade_duration, Easing.OutQuint); + + using (welcomeText.BeginDelayedSequence(text_appear_delay)) { - welcomeText.ScaleTo(1, 250, Easing.Out); - welcomeText.FadeIn(1000, Easing.Out); - welcomeText.TransformSpacingTo(new Vector2(20, 0), 1450, Easing.Out); + welcomeText.ScaleTo(1, text_scale_duration, Easing.Out); + welcomeText.FadeIn(text_fade_duration, Easing.Out); + welcomeText.TransformSpacingTo(new Vector2(20, 0), text_spacing_transform_duration, Easing.Out); } - using (smallRing.BeginDelayedSequence(200, true)) + using (smallRing.BeginDelayedSequence(small_ring_animation_start_delay, true)) { - smallRing.ResizeTo(40, 400, Easing.InExpo); - smallRing.Foreground.Delay(400).ResizeTo(1, 1500, Easing.OutQuint); + smallRing.ResizeTo(small_ring_size, small_ring_resize_duration, Easing.InExpo); + smallRing.Foreground.Delay(small_ring_resize_duration).ResizeTo(1, small_ring_fade_duration, Easing.OutQuint); } + duration = bar_animation_duration - bar_resize_delay; using (barsContainer.BeginDelayedSequence(500, true)) { foreach (var bar in barsContainer) { bar.FadeIn(); - bar.Delay(100).ResizeWidthTo(0, 900, Easing.OutExpo); + bar.Delay(bar_resize_delay).ResizeWidthTo(0, duration, Easing.OutExpo); } - barTopLeft.MoveTo(new Vector2(-120, -120), 900, Easing.OutQuint); - barTopRight.MoveTo(new Vector2(120, -120), 900, Easing.OutQuint); - barBottomLeft.MoveTo(new Vector2(-120, 120), 900, Easing.OutQuint); - barBottomRight.MoveTo(new Vector2(120, 120), 900, Easing.OutQuint); + barTopLeft.MoveTo(new Vector2(-bar_end_offset, -bar_end_offset), bar_animation_duration, Easing.OutQuint); + barTopRight.MoveTo(new Vector2(bar_end_offset, -bar_end_offset), bar_animation_duration, Easing.OutQuint); + barBottomLeft.MoveTo(new Vector2(-bar_end_offset, bar_end_offset), bar_animation_duration, Easing.OutQuint); + barBottomRight.MoveTo(new Vector2(bar_end_offset, bar_end_offset), bar_animation_duration, Easing.OutQuint); } - using (bigRing.BeginDelayedSequence(1950, true)) + using (bigRing.BeginDelayedSequence(big_ring_animation_start_delay, true)) { - bigRing.ResizeTo(400, 550, Easing.OutQuint); - bigRing.Foreground.ResizeTo(1, 700, Easing.InOutQuad); + bigRing.ResizeTo(big_ring_size, big_ring_resize_duration, Easing.OutQuint); + bigRing.Foreground.ResizeTo(1, big_ring_fade_duration, Easing.InOutQuad); } - using (backgroundFill.BeginDelayedSequence(2317)) + duration = full_animation_duration - background_animation_start_time; + using (backgroundFill.BeginDelayedSequence(background_animation_start_time)) { - backgroundFill.ResizeHeightTo(1, 650, Easing.InOutQuint); - backgroundFill.RotateTo(-90, 650, Easing.InOutQuint); + backgroundFill.ResizeHeightTo(1, duration, Easing.InOutQuint); + backgroundFill.RotateTo(-90, duration, Easing.InOutQuint); } - using (foregroundFill.BeginDelayedSequence(2350)) + duration = full_animation_duration - foreground_animation_start_time; + using (foregroundFill.BeginDelayedSequence(foreground_animation_start_time)) { - foregroundFill.ResizeWidthTo(1, 650, Easing.InOutQuint); - foregroundFill.RotateTo(-90, 650, Easing.InOutQuint); + foregroundFill.ResizeWidthTo(1, duration, Easing.InOutQuint); + foregroundFill.RotateTo(-90, duration, Easing.InOutQuint); } - using (yellowCircle.BeginDelayedSequence(2383)) + duration = full_animation_duration - purple_circle_animation_start_time; + using (purpleCircle.BeginDelayedSequence(purple_circle_animation_start_time)) { - yellowCircle.MoveToY(-207, 617, Easing.InOutQuad); - yellowCircle.RotateTo(-180, 617, Easing.InOutQuad); - yellowCircle.ResizeTo(414, 617, Easing.InOutSine); + purpleCircle.MoveToY((colored_circle_size - 2) / 2, duration, Easing.InOutQuad); + purpleCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.InOutQuad); + purpleCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutSine); } - using (purpleCircle.BeginDelayedSequence(2317)) + duration = full_animation_duration - yellow_circle_animation_start_time; + using (yellowCircle.BeginDelayedSequence(yellow_circle_animation_start_time)) { - purpleCircle.MoveToY(207, 683, Easing.InOutQuad); - purpleCircle.RotateTo(-180, 683, Easing.InOutQuad); - purpleCircle.ResizeTo(414, 683, Easing.InOutSine); + yellowCircle.MoveToY(-(colored_circle_size - 2) / 2, duration, Easing.InOutQuad); + yellowCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.InOutQuad); + yellowCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutSine); } - using (blueCircle.BeginDelayedSequence(2449)) + duration = full_animation_duration - blue_circle_animation_start_time; + using (blueCircle.BeginDelayedSequence(blue_circle_animation_start_time)) { - blueCircle.MoveToX(-207, 551, Easing.InOutQuad); - blueCircle.RotateTo(-180, 551, Easing.InOutQuad); - blueCircle.ResizeTo(414, 551, Easing.InOutSine); + blueCircle.MoveToX(-(colored_circle_size - 2) / 2, duration, Easing.InOutQuad); + blueCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.InOutQuad); + blueCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutSine); } - using (pinkCircle.BeginDelayedSequence(2515)) + duration = full_animation_duration - pink_circle_animation_start_time; + using (pinkCircle.BeginDelayedSequence(pink_circle_animation_start_time)) { - pinkCircle.MoveToX(208, 485, Easing.InOutQuad); - pinkCircle.RotateTo(-180, 485, Easing.InOutQuad); - pinkCircle.ResizeTo(416, 485, Easing.InOutSine); + pinkCircle.MoveToX(colored_circle_size / 2, duration, Easing.InOutQuad); + pinkCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.InOutQuad); + pinkCircle.ResizeTo(colored_circle_size, duration, Easing.InOutSine); } logo.Delay(3200).FadeIn(300); @@ -288,16 +347,16 @@ namespace osu.Game.Screens.Menu welcomeText.Alpha = 0; smallRing.Size = mediumRing.Size = bigRing.Size = Vector2.Zero; - mediumRing.Foreground.Size = new Vector2(0.75f); - smallRing.Foreground.Size = new Vector2(0.5f); + mediumRing.Foreground.Size = Vector2.One - medium_ring_thickness; + smallRing.Foreground.Size = Vector2.One - small_ring_thickness; bigRing.Foreground.Size = Vector2.Zero; - barTopLeft.Size = barTopRight.Size = barBottomLeft.Size = barBottomRight.Size = new Vector2(110, 1.5f); + barTopLeft.Size = barTopRight.Size = barBottomLeft.Size = barBottomRight.Size = bar_size; barTopLeft.Alpha = barTopRight.Alpha = barBottomLeft.Alpha = barBottomRight.Alpha = 0; - barTopLeft.Position = new Vector2(-90, -90); - barTopRight.Position = new Vector2(90, -90); - barBottomLeft.Position = new Vector2(-90, 90); - barBottomRight.Position = new Vector2(90, 90); + barTopLeft.Position = new Vector2(-bar_start_offset, -bar_start_offset); + barTopRight.Position = new Vector2(bar_start_offset, -bar_start_offset); + barBottomLeft.Position = new Vector2(-bar_start_offset, bar_start_offset); + barBottomRight.Position = new Vector2(bar_start_offset, bar_start_offset); backgroundFill.Rotation = foregroundFill.Rotation = 0; backgroundFill.Alpha = foregroundFill.Alpha = 1; @@ -305,10 +364,10 @@ namespace osu.Game.Screens.Menu yellowCircle.Size = purpleCircle.Size = blueCircle.Size = pinkCircle.Size = Vector2.Zero; yellowCircle.Rotation = purpleCircle.Rotation = blueCircle.Rotation = pinkCircle.Rotation = 0; - yellowCircle.Position = new Vector2(0, -250); - purpleCircle.Position = new Vector2(0, 250); - blueCircle.Position = new Vector2(-250, 0); - pinkCircle.Position = new Vector2(250, 0); + yellowCircle.Position = new Vector2(0, -colored_circle_offset); + purpleCircle.Position = new Vector2(0, colored_circle_offset); + blueCircle.Position = new Vector2(-colored_circle_offset, 0); + pinkCircle.Position = new Vector2(colored_circle_offset, 0); } public void Restart() From a58e828f541f9bce3252a80fcafafcd4d876289e Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 20:06:18 +0300 Subject: [PATCH 13/52] Timing adjustments --- osu.Game/Screens/Menu/IntroSequence.cs | 97 +++++++++++++------------- 1 file changed, 48 insertions(+), 49 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 8b91671734..43887edf97 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -21,46 +21,47 @@ namespace osu.Game.Screens.Menu private const int medium_ring_size = 130; private const int big_ring_size = 400; - private static readonly Vector2 medium_ring_thickness = new Vector2(0.25f); - private static readonly Vector2 small_ring_thickness = new Vector2(0.5f); + private static readonly Vector2 medium_ring_thickness = new Vector2(0.3f); + private static readonly Vector2 small_ring_thickness = new Vector2(0.6f); + private static readonly Vector2 big_ring_thickness = new Vector2(0.85f); - private static readonly Vector2 bar_size = new Vector2(110, 1.5f); + private static readonly Vector2 bar_size = new Vector2(105, 1.5f); private const int colored_circle_size = 416; //Time - private const int full_animation_duration = 3000; + private const int full_animation_duration = 2950; - private const int medium_ring_resize_duration = 500; - private const int medium_ring_fade_duration = 1000; + private const int medium_ring_resize_duration = 360; + private const int medium_ring_fade_duration = 420; private const int small_ring_animation_start_delay = 200; - private const int small_ring_resize_duration = 400; - private const int small_ring_fade_duration = 1500; + private const int small_ring_resize_duration = 250; + private const int small_ring_fade_duration = 650; - private const int text_appear_delay = 350; - private const int text_scale_duration = 250; - private const int text_fade_duration = 1000; - private const int text_spacing_transform_duration = 1450; + private const int text_appear_delay = 200; + private const int text_fade_duration = 700; + private const int text_spacing_transform_duration = 1500; - private const int bar_animation_duration = 1000; - private const int bar_resize_delay = 300; + private const int bar_animation_duration = 700; + private const int bar_resize_delay = 150; - private const int big_ring_animation_start_delay = 1950; - private const int big_ring_resize_duration = 550; - private const int big_ring_fade_duration = 700; + private const int big_ring_animation_start_delay = 2000; + private const int big_ring_resize_duration = 500; + private const int big_ring_foreground_resize_delay = 250; + private const int big_ring_fade_duration = 600; - private const int background_animation_start_time = 2317; - private const int foreground_animation_start_time = 2350; + private const int background_animation_start_time = 2250; + private const int foreground_animation_start_time = 2300; - private const int colored_curcle_rotation_delay = 100; - private const int purple_circle_animation_start_time = 2317; - private const int yellow_circle_animation_start_time = 2383; - private const int blue_circle_animation_start_time = 2449; - private const int pink_circle_animation_start_time = 2515; + private const int colored_curcle_rotation_delay = 150; + private const int purple_circle_animation_start_time = 2250; + private const int yellow_circle_animation_start_time = 2315; + private const int blue_circle_animation_start_time = 2380; + private const int pink_circle_animation_start_time = 2445; //Position - private const int bar_start_offset = 90; + private const int bar_start_offset = 80; private const int bar_end_offset = 120; private const int colored_circle_offset = 250; @@ -92,7 +93,7 @@ namespace osu.Game.Screens.Menu RelativeSizeAxes = Axes.Both; Children = new Drawable[] { - mediumRing = new Ring(Color4.White.Opacity(80)), + mediumRing = new Ring(Color4.White.Opacity(130)), barsContainer = new Container { Anchor = Anchor.Centre, @@ -250,28 +251,27 @@ namespace osu.Game.Screens.Menu int duration; mediumRing.ResizeTo(medium_ring_size, medium_ring_resize_duration, Easing.InExpo); - mediumRing.Foreground.Delay(medium_ring_resize_duration).ResizeTo(1, medium_ring_fade_duration, Easing.OutQuint); + mediumRing.Foreground.Delay(medium_ring_resize_duration).ResizeTo(1, medium_ring_fade_duration, Easing.OutQuad); using (welcomeText.BeginDelayedSequence(text_appear_delay)) { - welcomeText.ScaleTo(1, text_scale_duration, Easing.Out); - welcomeText.FadeIn(text_fade_duration, Easing.Out); + welcomeText.FadeIn(text_fade_duration); welcomeText.TransformSpacingTo(new Vector2(20, 0), text_spacing_transform_duration, Easing.Out); } using (smallRing.BeginDelayedSequence(small_ring_animation_start_delay, true)) { smallRing.ResizeTo(small_ring_size, small_ring_resize_duration, Easing.InExpo); - smallRing.Foreground.Delay(small_ring_resize_duration).ResizeTo(1, small_ring_fade_duration, Easing.OutQuint); + smallRing.Foreground.Delay(small_ring_resize_duration).ResizeTo(1, small_ring_fade_duration, Easing.OutQuad); } duration = bar_animation_duration - bar_resize_delay; - using (barsContainer.BeginDelayedSequence(500, true)) + using (barsContainer.BeginDelayedSequence(medium_ring_resize_duration, true)) { foreach (var bar in barsContainer) { bar.FadeIn(); - bar.Delay(bar_resize_delay).ResizeWidthTo(0, duration, Easing.OutExpo); + bar.Delay(bar_resize_delay).ResizeWidthTo(0, duration, Easing.OutQuint); } barTopLeft.MoveTo(new Vector2(-bar_end_offset, -bar_end_offset), bar_animation_duration, Easing.OutQuint); @@ -282,54 +282,54 @@ namespace osu.Game.Screens.Menu using (bigRing.BeginDelayedSequence(big_ring_animation_start_delay, true)) { - bigRing.ResizeTo(big_ring_size, big_ring_resize_duration, Easing.OutQuint); - bigRing.Foreground.ResizeTo(1, big_ring_fade_duration, Easing.InOutQuad); + bigRing.ResizeTo(big_ring_size, big_ring_resize_duration, Easing.InOutQuint); + bigRing.Foreground.Delay(big_ring_foreground_resize_delay).ResizeTo(1, big_ring_fade_duration, Easing.OutExpo); } duration = full_animation_duration - background_animation_start_time; using (backgroundFill.BeginDelayedSequence(background_animation_start_time)) { - backgroundFill.ResizeHeightTo(1, duration, Easing.InOutQuint); - backgroundFill.RotateTo(-90, duration, Easing.InOutQuint); + backgroundFill.ResizeHeightTo(1, duration, Easing.InOutQuart); + backgroundFill.RotateTo(-90, duration, Easing.InOutQuart); } duration = full_animation_duration - foreground_animation_start_time; using (foregroundFill.BeginDelayedSequence(foreground_animation_start_time)) { - foregroundFill.ResizeWidthTo(1, duration, Easing.InOutQuint); - foregroundFill.RotateTo(-90, duration, Easing.InOutQuint); + foregroundFill.ResizeWidthTo(1, duration, Easing.InOutQuart); + foregroundFill.RotateTo(-90, duration, Easing.InOutQuart); } duration = full_animation_duration - purple_circle_animation_start_time; using (purpleCircle.BeginDelayedSequence(purple_circle_animation_start_time)) { purpleCircle.MoveToY((colored_circle_size - 2) / 2, duration, Easing.InOutQuad); - purpleCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.InOutQuad); - purpleCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutSine); + purpleCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.OutQuad); + purpleCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); } duration = full_animation_duration - yellow_circle_animation_start_time; using (yellowCircle.BeginDelayedSequence(yellow_circle_animation_start_time)) { yellowCircle.MoveToY(-(colored_circle_size - 2) / 2, duration, Easing.InOutQuad); - yellowCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.InOutQuad); - yellowCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutSine); + yellowCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.OutQuad); + yellowCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); } duration = full_animation_duration - blue_circle_animation_start_time; using (blueCircle.BeginDelayedSequence(blue_circle_animation_start_time)) { blueCircle.MoveToX(-(colored_circle_size - 2) / 2, duration, Easing.InOutQuad); - blueCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.InOutQuad); - blueCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutSine); + blueCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.OutQuad); + blueCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); } duration = full_animation_duration - pink_circle_animation_start_time; using (pinkCircle.BeginDelayedSequence(pink_circle_animation_start_time)) { pinkCircle.MoveToX(colored_circle_size / 2, duration, Easing.InOutQuad); - pinkCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.InOutQuad); - pinkCircle.ResizeTo(colored_circle_size, duration, Easing.InOutSine); + pinkCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.OutQuad); + pinkCircle.ResizeTo(colored_circle_size, duration, Easing.InOutQuad); } logo.Delay(3200).FadeIn(300); @@ -342,14 +342,13 @@ namespace osu.Game.Screens.Menu { logo.Alpha = 0; - welcomeText.Scale = new Vector2(0.9f); - welcomeText.Spacing = Vector2.Zero; + welcomeText.Spacing = new Vector2(5); welcomeText.Alpha = 0; smallRing.Size = mediumRing.Size = bigRing.Size = Vector2.Zero; mediumRing.Foreground.Size = Vector2.One - medium_ring_thickness; smallRing.Foreground.Size = Vector2.One - small_ring_thickness; - bigRing.Foreground.Size = Vector2.Zero; + bigRing.Foreground.Size = Vector2.One - big_ring_thickness; barTopLeft.Size = barTopRight.Size = barBottomLeft.Size = barBottomRight.Size = bar_size; barTopLeft.Alpha = barTopRight.Alpha = barBottomLeft.Alpha = barBottomRight.Alpha = 0; From 57a4a1d8d4ac3297b4bbfa4083c63ae75a075d5e Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 20:07:12 +0300 Subject: [PATCH 14/52] Framework update --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 81c9517d04..d64d5fe880 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 81c9517d04196866c363a68ba2d20b9bb8300a7b +Subproject commit d64d5fe880c017b2f69d79bc5c09f363b0f9ff5d From d3a62082b45eecb9130e74a134ef70497040f574 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 20:20:49 +0300 Subject: [PATCH 15/52] Final adjustments --- osu.Game/Screens/Menu/IntroSequence.cs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 43887edf97..4c4b48ea5b 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -49,17 +49,19 @@ namespace osu.Game.Screens.Menu private const int big_ring_animation_start_delay = 2000; private const int big_ring_resize_duration = 500; private const int big_ring_foreground_resize_delay = 250; - private const int big_ring_fade_duration = 600; + private const int big_ring_fade_duration = 450; private const int background_animation_start_time = 2250; private const int foreground_animation_start_time = 2300; - private const int colored_curcle_rotation_delay = 150; + private const int colored_curcle_rotation_delay = 110; private const int purple_circle_animation_start_time = 2250; private const int yellow_circle_animation_start_time = 2315; private const int blue_circle_animation_start_time = 2380; private const int pink_circle_animation_start_time = 2445; + private const int logo_fade_duration = 300; + //Position private const int bar_start_offset = 80; private const int bar_end_offset = 120; @@ -332,10 +334,10 @@ namespace osu.Game.Screens.Menu pinkCircle.ResizeTo(colored_circle_size, duration, Easing.InOutQuad); } - logo.Delay(3200).FadeIn(300); + logo.Delay(full_animation_duration).FadeIn(logo_fade_duration); - backgroundFill.Delay(3200).FadeOut(); - foregroundFill.Delay(3500).FadeOut(); + backgroundFill.Delay(full_animation_duration + logo_fade_duration).FadeOut(); + foregroundFill.Delay(full_animation_duration + logo_fade_duration).FadeOut(); } private void setDefaults() From 15160f5116ac0f8905778d9e85e4de99bc49728f Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 20:43:07 +0300 Subject: [PATCH 16/52] Simplify the code by using more delayed sequences --- osu.Game/Screens/Menu/IntroSequence.cs | 64 ++++++++++++-------------- 1 file changed, 29 insertions(+), 35 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 4c4b48ea5b..c67aa775e9 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -35,11 +35,9 @@ namespace osu.Game.Screens.Menu private const int medium_ring_resize_duration = 360; private const int medium_ring_fade_duration = 420; - private const int small_ring_animation_start_delay = 200; private const int small_ring_resize_duration = 250; private const int small_ring_fade_duration = 650; - private const int text_appear_delay = 200; private const int text_fade_duration = 700; private const int text_spacing_transform_duration = 1500; @@ -54,11 +52,9 @@ namespace osu.Game.Screens.Menu private const int background_animation_start_time = 2250; private const int foreground_animation_start_time = 2300; - private const int colored_curcle_rotation_delay = 110; + private const int colored_circle_rotation_delay = 110; + private const int colored_circles_appear_delay = 80; private const int purple_circle_animation_start_time = 2250; - private const int yellow_circle_animation_start_time = 2315; - private const int blue_circle_animation_start_time = 2380; - private const int pink_circle_animation_start_time = 2445; private const int logo_fade_duration = 300; @@ -253,23 +249,21 @@ namespace osu.Game.Screens.Menu int duration; mediumRing.ResizeTo(medium_ring_size, medium_ring_resize_duration, Easing.InExpo); - mediumRing.Foreground.Delay(medium_ring_resize_duration).ResizeTo(1, medium_ring_fade_duration, Easing.OutQuad); - using (welcomeText.BeginDelayedSequence(text_appear_delay)) + using (BeginDelayedSequence(200, true)) { welcomeText.FadeIn(text_fade_duration); welcomeText.TransformSpacingTo(new Vector2(20, 0), text_spacing_transform_duration, Easing.Out); - } - using (smallRing.BeginDelayedSequence(small_ring_animation_start_delay, true)) - { smallRing.ResizeTo(small_ring_size, small_ring_resize_duration, Easing.InExpo); smallRing.Foreground.Delay(small_ring_resize_duration).ResizeTo(1, small_ring_fade_duration, Easing.OutQuad); } duration = bar_animation_duration - bar_resize_delay; - using (barsContainer.BeginDelayedSequence(medium_ring_resize_duration, true)) + using (BeginDelayedSequence(medium_ring_resize_duration, true)) { + mediumRing.Foreground.ResizeTo(1, medium_ring_fade_duration, Easing.OutQuad); + foreach (var bar in barsContainer) { bar.FadeIn(); @@ -303,35 +297,35 @@ namespace osu.Game.Screens.Menu } duration = full_animation_duration - purple_circle_animation_start_time; - using (purpleCircle.BeginDelayedSequence(purple_circle_animation_start_time)) + using (BeginDelayedSequence(purple_circle_animation_start_time, true)) { purpleCircle.MoveToY((colored_circle_size - 2) / 2, duration, Easing.InOutQuad); - purpleCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.OutQuad); + purpleCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); purpleCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); - } - duration = full_animation_duration - yellow_circle_animation_start_time; - using (yellowCircle.BeginDelayedSequence(yellow_circle_animation_start_time)) - { - yellowCircle.MoveToY(-(colored_circle_size - 2) / 2, duration, Easing.InOutQuad); - yellowCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.OutQuad); - yellowCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); - } + duration -= colored_circles_appear_delay; + using (BeginDelayedSequence(colored_circles_appear_delay, true)) + { + yellowCircle.MoveToY(-(colored_circle_size - 2) / 2, duration, Easing.InOutQuad); + yellowCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); + yellowCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); - duration = full_animation_duration - blue_circle_animation_start_time; - using (blueCircle.BeginDelayedSequence(blue_circle_animation_start_time)) - { - blueCircle.MoveToX(-(colored_circle_size - 2) / 2, duration, Easing.InOutQuad); - blueCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.OutQuad); - blueCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); - } + duration -= colored_circles_appear_delay; + using (BeginDelayedSequence(colored_circles_appear_delay, true)) + { + blueCircle.MoveToX(-(colored_circle_size - 2) / 2, duration, Easing.InOutQuad); + blueCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); + blueCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); - duration = full_animation_duration - pink_circle_animation_start_time; - using (pinkCircle.BeginDelayedSequence(pink_circle_animation_start_time)) - { - pinkCircle.MoveToX(colored_circle_size / 2, duration, Easing.InOutQuad); - pinkCircle.Delay(colored_curcle_rotation_delay).RotateTo(-180, duration - colored_curcle_rotation_delay, Easing.OutQuad); - pinkCircle.ResizeTo(colored_circle_size, duration, Easing.InOutQuad); + duration -= colored_circles_appear_delay; + using (BeginDelayedSequence(colored_circles_appear_delay, true)) + { + pinkCircle.MoveToX(colored_circle_size / 2, duration, Easing.InOutQuad); + pinkCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); + pinkCircle.ResizeTo(colored_circle_size, duration, Easing.InOutQuad); + } + } + } } logo.Delay(full_animation_duration).FadeIn(logo_fade_duration); From 28a594179f998a833b2ec01e78e086f6d9140ede Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Tue, 10 Oct 2017 21:03:35 +0300 Subject: [PATCH 17/52] CI fixes --- osu.Game/Screens/Menu/IntroSequence.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index c67aa775e9..963f069312 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -246,8 +246,6 @@ namespace osu.Game.Screens.Menu public void Start() { - int duration; - mediumRing.ResizeTo(medium_ring_size, medium_ring_resize_duration, Easing.InExpo); using (BeginDelayedSequence(200, true)) @@ -259,7 +257,7 @@ namespace osu.Game.Screens.Menu smallRing.Foreground.Delay(small_ring_resize_duration).ResizeTo(1, small_ring_fade_duration, Easing.OutQuad); } - duration = bar_animation_duration - bar_resize_delay; + int duration = bar_animation_duration - bar_resize_delay; using (BeginDelayedSequence(medium_ring_resize_duration, true)) { mediumRing.Foreground.ResizeTo(1, medium_ring_fade_duration, Easing.OutQuad); @@ -299,28 +297,28 @@ namespace osu.Game.Screens.Menu duration = full_animation_duration - purple_circle_animation_start_time; using (BeginDelayedSequence(purple_circle_animation_start_time, true)) { - purpleCircle.MoveToY((colored_circle_size - 2) / 2, duration, Easing.InOutQuad); + purpleCircle.MoveToY((colored_circle_size - 2) / 2.0f, duration, Easing.InOutQuad); purpleCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); purpleCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); duration -= colored_circles_appear_delay; using (BeginDelayedSequence(colored_circles_appear_delay, true)) { - yellowCircle.MoveToY(-(colored_circle_size - 2) / 2, duration, Easing.InOutQuad); + yellowCircle.MoveToY(-(colored_circle_size - 2) / 2.0f, duration, Easing.InOutQuad); yellowCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); yellowCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); duration -= colored_circles_appear_delay; using (BeginDelayedSequence(colored_circles_appear_delay, true)) { - blueCircle.MoveToX(-(colored_circle_size - 2) / 2, duration, Easing.InOutQuad); + blueCircle.MoveToX(-(colored_circle_size - 2) / 2.0f, duration, Easing.InOutQuad); blueCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); blueCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); duration -= colored_circles_appear_delay; using (BeginDelayedSequence(colored_circles_appear_delay, true)) { - pinkCircle.MoveToX(colored_circle_size / 2, duration, Easing.InOutQuad); + pinkCircle.MoveToX(colored_circle_size / 2.0f, duration, Easing.InOutQuad); pinkCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); pinkCircle.ResizeTo(colored_circle_size, duration, Easing.InOutQuad); } From 7cff413ab016a4f2dcdffbfcb060f3d5e2fd1718 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Wed, 11 Oct 2017 20:25:12 +0300 Subject: [PATCH 18/52] Fix wrong beatmap selection in song-select menu on deleting selected beatmap --- osu.Game/Screens/Select/BeatmapCarousel.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index c72f599955..245dfb091c 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -375,6 +375,9 @@ namespace osu.Game.Screens.Select if (group == null) return; + if (selectedGroup == group) + SelectNext(); + groups.Remove(group); panels.Remove(group.Header); foreach (var p in group.BeatmapPanels) @@ -383,9 +386,6 @@ namespace osu.Game.Screens.Select scrollableContent.Remove(group.Header); scrollableContent.RemoveRange(group.BeatmapPanels); - if (selectedGroup == group) - SelectNext(); - computeYPositions(); } From 502940ddf3cb372457de78d2bb6d532e7ef2e2d6 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Sat, 14 Oct 2017 05:05:38 +0300 Subject: [PATCH 19/52] Fix deleting last visible beatmap doesn't trigger selecting null beatmap --- osu.Game/Screens/Select/BeatmapCarousel.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/Select/BeatmapCarousel.cs b/osu.Game/Screens/Select/BeatmapCarousel.cs index 245dfb091c..326b632630 100644 --- a/osu.Game/Screens/Select/BeatmapCarousel.cs +++ b/osu.Game/Screens/Select/BeatmapCarousel.cs @@ -181,13 +181,18 @@ namespace osu.Game.Screens.Select public Action HideDifficultyRequested; + private void selectNullBeatmap() + { + selectedGroup = null; + selectedPanel = null; + SelectionChanged?.Invoke(null); + } + public void SelectNext(int direction = 1, bool skipDifficulties = true) { if (groups.All(g => g.State == BeatmapGroupState.Hidden)) { - selectedGroup = null; - selectedPanel = null; - SelectionChanged?.Invoke(null); + selectNullBeatmap(); return; } @@ -376,7 +381,12 @@ namespace osu.Game.Screens.Select return; if (selectedGroup == group) - SelectNext(); + { + if (getVisibleGroups().Count() == 1) + selectNullBeatmap(); + else + SelectNext(); + } groups.Remove(group); panels.Remove(group.Header); From e5dae81356fcde259e4de7974f981f58b4074d72 Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Thu, 26 Oct 2017 14:42:23 +0300 Subject: [PATCH 20/52] Move testcase to the right place --- osu.Game.Tests/Visual/TestCaseIntro.cs | 42 ++++++++++++++++++++++++++ osu.Game.Tests/osu.Game.Tests.csproj | 1 + 2 files changed, 43 insertions(+) create mode 100644 osu.Game.Tests/Visual/TestCaseIntro.cs diff --git a/osu.Game.Tests/Visual/TestCaseIntro.cs b/osu.Game.Tests/Visual/TestCaseIntro.cs new file mode 100644 index 0000000000..6d03705bf3 --- /dev/null +++ b/osu.Game.Tests/Visual/TestCaseIntro.cs @@ -0,0 +1,42 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using OpenTK.Graphics; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Shapes; +using osu.Framework.Timing; +using osu.Game.Screens.Menu; + +namespace osu.Game.Tests.Visual +{ + public class TestCaseIntro : OsuTestCase + { + public TestCaseIntro() + { + IntroSequence intro; + + var rateAdjustClock = new StopwatchClock(true); + var framedClock = new FramedClock(rateAdjustClock); + framedClock.ProcessFrame(); + + Add(new Container + { + RelativeSizeAxes = Axes.Both, + Clock = framedClock, + Children = new Drawable[] + { + new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.Black, + }, + intro = new IntroSequence(), + } + }); + + AddStep(@"Restart", intro.Restart); + AddSliderStep("Playback speed", 0.0, 2.0, 1, v => rateAdjustClock.Rate = v); + } + } +} diff --git a/osu.Game.Tests/osu.Game.Tests.csproj b/osu.Game.Tests/osu.Game.Tests.csproj index e0e9fb7b5e..31d48097f9 100644 --- a/osu.Game.Tests/osu.Game.Tests.csproj +++ b/osu.Game.Tests/osu.Game.Tests.csproj @@ -110,6 +110,7 @@ + From db3e4e77da165e29ac7b4a434c6d822742d29d0a Mon Sep 17 00:00:00 2001 From: EVAST9919 Date: Thu, 26 Oct 2017 14:45:45 +0300 Subject: [PATCH 21/52] Submodules update --- osu-framework | 2 +- osu-resources | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/osu-framework b/osu-framework index 5986f21268..a9eb6eaab7 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 5986f2126832451a5a7ec832a483e1dcec1b38b8 +Subproject commit a9eb6eaab7cd77f881acfdc23664df45e5d31105 diff --git a/osu-resources b/osu-resources index a4418111f8..1e2d394e01 160000 --- a/osu-resources +++ b/osu-resources @@ -1 +1 @@ -Subproject commit a4418111f8ed2350a6fd46fe69258884f0757745 +Subproject commit 1e2d394e017d98f086271ae07fb61859b5d8fadf From 15197b9a7650723180606a317a0f93649ae5a6d6 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 1 Nov 2017 16:57:59 +0900 Subject: [PATCH 22/52] Use internal less Allows for more dynamic compilation to succeed. No reason for using internal here anyways. --- osu.Game/Screens/Edit/Editor.cs | 2 +- osu.Game/Screens/Loader.cs | 2 +- osu.Game/Screens/Menu/Disclaimer.cs | 6 +++--- osu.Game/Screens/Menu/Intro.cs | 4 ++-- osu.Game/Screens/Menu/MainMenu.cs | 2 +- osu.Game/Screens/OsuScreen.cs | 8 ++++---- osu.Game/Screens/Play/Player.cs | 6 +++--- osu.Game/Screens/Play/PlayerLoader.cs | 4 ++-- osu.Game/Screens/Ranking/Results.cs | 2 +- osu.Game/Screens/Tournament/Drawings.cs | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/osu.Game/Screens/Edit/Editor.cs b/osu.Game/Screens/Edit/Editor.cs index c610a24e22..74e55e58ad 100644 --- a/osu.Game/Screens/Edit/Editor.cs +++ b/osu.Game/Screens/Edit/Editor.cs @@ -24,7 +24,7 @@ namespace osu.Game.Screens.Edit { protected override BackgroundScreen CreateBackground() => new BackgroundScreenCustom(@"Backgrounds/bg4"); - internal override bool ShowOverlays => false; + public override bool ShowOverlays => false; private readonly Box bottomBackground; private readonly Container screenContainer; diff --git a/osu.Game/Screens/Loader.cs b/osu.Game/Screens/Loader.cs index af084e740b..295b3603be 100644 --- a/osu.Game/Screens/Loader.cs +++ b/osu.Game/Screens/Loader.cs @@ -8,7 +8,7 @@ namespace osu.Game.Screens { internal class Loader : OsuScreen { - internal override bool ShowOverlays => false; + public override bool ShowOverlays => false; public Loader() { diff --git a/osu.Game/Screens/Menu/Disclaimer.cs b/osu.Game/Screens/Menu/Disclaimer.cs index 1ac5823ec4..532ee71b72 100644 --- a/osu.Game/Screens/Menu/Disclaimer.cs +++ b/osu.Game/Screens/Menu/Disclaimer.cs @@ -12,15 +12,15 @@ using OpenTK.Graphics; namespace osu.Game.Screens.Menu { - internal class Disclaimer : OsuScreen + public class Disclaimer : OsuScreen { private Intro intro; private readonly SpriteIcon icon; private Color4 iconColour; - internal override bool ShowOverlays => false; + public override bool ShowOverlays => false; - internal override bool HasLocalCursorDisplayed => true; + public override bool HasLocalCursorDisplayed => true; public Disclaimer() { diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 066391b11f..09958472e2 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -32,9 +32,9 @@ namespace osu.Game.Screens.Menu private SampleChannel welcome; private SampleChannel seeya; - internal override bool HasLocalCursorDisplayed => true; + public override bool HasLocalCursorDisplayed => true; - internal override bool ShowOverlays => false; + public override bool ShowOverlays => false; protected override BackgroundScreen CreateBackground() => new BackgroundScreenEmpty(); diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index 1c82d15f50..ff902bf28b 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -23,7 +23,7 @@ namespace osu.Game.Screens.Menu { private readonly ButtonSystem buttons; - internal override bool ShowOverlays => buttons.State != MenuState.Initial; + public override bool ShowOverlays => buttons.State != MenuState.Initial; private readonly BackgroundScreenDefault background; private Screen songSelect; diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs index ae10d8828b..2a3cba0d49 100644 --- a/osu.Game/Screens/OsuScreen.cs +++ b/osu.Game/Screens/OsuScreen.cs @@ -16,7 +16,7 @@ namespace osu.Game.Screens { public abstract class OsuScreen : Screen { - internal BackgroundScreen Background { get; private set; } + public BackgroundScreen Background { get; private set; } /// /// Override to create a BackgroundMode for the current screen. @@ -24,17 +24,17 @@ namespace osu.Game.Screens /// protected virtual BackgroundScreen CreateBackground() => null; - internal virtual bool ShowOverlays => true; + public virtual bool ShowOverlays => true; protected new OsuGameBase Game => base.Game as OsuGameBase; - internal virtual bool HasLocalCursorDisplayed => false; + public virtual bool HasLocalCursorDisplayed => false; /// /// Whether the beatmap or ruleset should be allowed to be changed by the user or game. /// Used to mark exclusive areas where this is strongly prohibited, like gameplay. /// - internal virtual bool AllowBeatmapRulesetChange => true; + public virtual bool AllowBeatmapRulesetChange => true; protected readonly Bindable Beatmap = new Bindable(); diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 589f4b663a..3775b9c933 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -34,13 +34,13 @@ namespace osu.Game.Screens.Play { protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap); - internal override bool ShowOverlays => false; + public override bool ShowOverlays => false; - internal override bool HasLocalCursorDisplayed => !pauseContainer.IsPaused && !HasFailed && RulesetContainer.ProvidingUserCursor; + public override bool HasLocalCursorDisplayed => !pauseContainer.IsPaused && !HasFailed && RulesetContainer.ProvidingUserCursor; public Action RestartRequested; - internal override bool AllowBeatmapRulesetChange => false; + public override bool AllowBeatmapRulesetChange => false; public bool HasFailed { get; private set; } diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index a5248acbe4..71c2ec9a6d 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -24,9 +24,9 @@ namespace osu.Game.Screens.Play private BeatmapMetadataDisplay info; private bool showOverlays = true; - internal override bool ShowOverlays => showOverlays; + public override bool ShowOverlays => showOverlays; - internal override bool AllowBeatmapRulesetChange => false; + public override bool AllowBeatmapRulesetChange => false; protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap); diff --git a/osu.Game/Screens/Ranking/Results.cs b/osu.Game/Screens/Ranking/Results.cs index 60ad484673..8e27cb235c 100644 --- a/osu.Game/Screens/Ranking/Results.cs +++ b/osu.Game/Screens/Ranking/Results.cs @@ -31,7 +31,7 @@ namespace osu.Game.Screens.Ranking private ResultModeTabControl modeChangeButtons; - internal override bool AllowBeatmapRulesetChange => false; + public override bool AllowBeatmapRulesetChange => false; private Container currentPage; diff --git a/osu.Game/Screens/Tournament/Drawings.cs b/osu.Game/Screens/Tournament/Drawings.cs index 3d27552212..e540782fc1 100644 --- a/osu.Game/Screens/Tournament/Drawings.cs +++ b/osu.Game/Screens/Tournament/Drawings.cs @@ -29,7 +29,7 @@ namespace osu.Game.Screens.Tournament { private const string results_filename = "drawings_results.txt"; - internal override bool ShowOverlays => false; + public override bool ShowOverlays => false; protected override BackgroundScreen CreateBackground() => new BackgroundScreenDefault(); From 09e0bd7a7853ff4663896e5b66cbfb45e781da8c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 1 Nov 2017 16:58:12 +0900 Subject: [PATCH 23/52] Remove unused class file --- osu.Game/Tests/Visual/TestCaseIntro.cs | 42 -------------------------- 1 file changed, 42 deletions(-) delete mode 100644 osu.Game/Tests/Visual/TestCaseIntro.cs diff --git a/osu.Game/Tests/Visual/TestCaseIntro.cs b/osu.Game/Tests/Visual/TestCaseIntro.cs deleted file mode 100644 index d803caf2b0..0000000000 --- a/osu.Game/Tests/Visual/TestCaseIntro.cs +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2007-2017 ppy Pty Ltd . -// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE - -using OpenTK.Graphics; -using osu.Framework.Graphics; -using osu.Framework.Graphics.Containers; -using osu.Framework.Graphics.Shapes; -using osu.Framework.Timing; -using osu.Game.Screens.Menu; - -namespace osu.Game.Tests.Visual -{ - internal class TestCaseIntro : OsuTestCase - { - public TestCaseIntro() - { - IntroSequence intro; - - var rateAdjustClock = new StopwatchClock(true); - var framedClock = new FramedClock(rateAdjustClock); - framedClock.ProcessFrame(); - - Add(new Container - { - RelativeSizeAxes = Axes.Both, - Clock = framedClock, - Children = new Drawable[] - { - new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.Black, - }, - intro = new IntroSequence(), - } - }); - - AddStep(@"Restart", intro.Restart); - AddSliderStep("Playback speed", 0.0, 2.0, 1, v => rateAdjustClock.Rate = v); - } - } -} From fd5bc6fe58e086f09cd4814664d624420361806d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 1 Nov 2017 17:06:55 +0900 Subject: [PATCH 24/52] Make ParallaxContainer public --- osu.Game/Graphics/Containers/ParallaxContainer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Graphics/Containers/ParallaxContainer.cs b/osu.Game/Graphics/Containers/ParallaxContainer.cs index 3e0ed4b059..362563507b 100644 --- a/osu.Game/Graphics/Containers/ParallaxContainer.cs +++ b/osu.Game/Graphics/Containers/ParallaxContainer.cs @@ -11,7 +11,7 @@ using osu.Framework.Configuration; namespace osu.Game.Graphics.Containers { - internal class ParallaxContainer : Container, IRequireHighFrequencyMousePosition + public class ParallaxContainer : Container, IRequireHighFrequencyMousePosition { public float ParallaxAmount = 0.02f; From 27156aeb9304cafb86534e01b10294724f671844 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 1 Nov 2017 17:07:03 +0900 Subject: [PATCH 25/52] Fix the shit --- osu.Game.Tests/Visual/TestCaseIntro.cs | 7 ++ osu.Game/Screens/Menu/IntroSequence.cs | 138 ++++++++++++------------- 2 files changed, 72 insertions(+), 73 deletions(-) diff --git a/osu.Game.Tests/Visual/TestCaseIntro.cs b/osu.Game.Tests/Visual/TestCaseIntro.cs index 6d03705bf3..a2375a592e 100644 --- a/osu.Game.Tests/Visual/TestCaseIntro.cs +++ b/osu.Game.Tests/Visual/TestCaseIntro.cs @@ -1,6 +1,8 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System; +using System.Collections.Generic; using OpenTK.Graphics; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -12,6 +14,11 @@ namespace osu.Game.Tests.Visual { public class TestCaseIntro : OsuTestCase { + public override IReadOnlyList RequiredTypes => new[] + { + typeof(IntroSequence) + }; + public TestCaseIntro() { IntroSequence intro; diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 963f069312..37c891a13a 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -15,53 +15,7 @@ namespace osu.Game.Screens.Menu public class IntroSequence : Container { //Size - private const int logo_size = 460; - - private const int small_ring_size = 40; - private const int medium_ring_size = 130; - private const int big_ring_size = 400; - - private static readonly Vector2 medium_ring_thickness = new Vector2(0.3f); - private static readonly Vector2 small_ring_thickness = new Vector2(0.6f); - private static readonly Vector2 big_ring_thickness = new Vector2(0.85f); - - private static readonly Vector2 bar_size = new Vector2(105, 1.5f); - - private const int colored_circle_size = 416; - - //Time - private const int full_animation_duration = 2950; - - private const int medium_ring_resize_duration = 360; - private const int medium_ring_fade_duration = 420; - - private const int small_ring_resize_duration = 250; - private const int small_ring_fade_duration = 650; - - private const int text_fade_duration = 700; - private const int text_spacing_transform_duration = 1500; - - private const int bar_animation_duration = 700; - private const int bar_resize_delay = 150; - - private const int big_ring_animation_start_delay = 2000; - private const int big_ring_resize_duration = 500; - private const int big_ring_foreground_resize_delay = 250; - private const int big_ring_fade_duration = 450; - - private const int background_animation_start_time = 2250; - private const int foreground_animation_start_time = 2300; - - private const int colored_circle_rotation_delay = 110; - private const int colored_circles_appear_delay = 80; - private const int purple_circle_animation_start_time = 2250; - - private const int logo_fade_duration = 300; - - //Position - private const int bar_start_offset = 80; - private const int bar_end_offset = 120; - private const int colored_circle_offset = 250; + private const int logo_size = 460; //todo: this should probably be 480 private readonly OsuSpriteText welcomeText; @@ -246,18 +200,51 @@ namespace osu.Game.Screens.Menu public void Start() { - mediumRing.ResizeTo(medium_ring_size, medium_ring_resize_duration, Easing.InExpo); + const int circle_size = 416; + + //Time + const int full_animation_duration = 2950; + + const int medium_ring_resize_duration = 360; + const int medium_ring_fade_duration = 420; + + const int small_ring_resize_duration = 250; + const int small_ring_fade_duration = 650; + + const int text_fade_duration = 700; + const int text_spacing_transform_duration = 1500; + + const int bar_animation_duration = 700; + const int bar_resize_delay = 150; + + const int big_ring_animation_start_delay = 2000; + const int big_ring_resize_duration = 500; + const int big_ring_foreground_resize_delay = 250; + const int big_ring_fade_duration = 450; + + const int background_animation_start_time = 2250; + const int foreground_animation_start_time = 2300; + + const int colored_circle_rotation_delay = 110; + const int colored_circles_appear_delay = 80; + const int purple_circle_animation_start_time = 2250; + + const int logo_fade_duration = 300; + + //Position + const int bar_end_offset = 120; + + mediumRing.ResizeTo(130, medium_ring_resize_duration, Easing.InExpo); using (BeginDelayedSequence(200, true)) { welcomeText.FadeIn(text_fade_duration); welcomeText.TransformSpacingTo(new Vector2(20, 0), text_spacing_transform_duration, Easing.Out); - smallRing.ResizeTo(small_ring_size, small_ring_resize_duration, Easing.InExpo); + smallRing.ResizeTo(40, small_ring_resize_duration, Easing.InExpo); smallRing.Foreground.Delay(small_ring_resize_duration).ResizeTo(1, small_ring_fade_duration, Easing.OutQuad); } - int duration = bar_animation_duration - bar_resize_delay; using (BeginDelayedSequence(medium_ring_resize_duration, true)) { mediumRing.Foreground.ResizeTo(1, medium_ring_fade_duration, Easing.OutQuad); @@ -265,7 +252,7 @@ namespace osu.Game.Screens.Menu foreach (var bar in barsContainer) { bar.FadeIn(); - bar.Delay(bar_resize_delay).ResizeWidthTo(0, duration, Easing.OutQuint); + bar.Delay(bar_resize_delay).ResizeWidthTo(0, bar_animation_duration - bar_resize_delay, Easing.OutQuint); } barTopLeft.MoveTo(new Vector2(-bar_end_offset, -bar_end_offset), bar_animation_duration, Easing.OutQuint); @@ -276,11 +263,11 @@ namespace osu.Game.Screens.Menu using (bigRing.BeginDelayedSequence(big_ring_animation_start_delay, true)) { - bigRing.ResizeTo(big_ring_size, big_ring_resize_duration, Easing.InOutQuint); + bigRing.ResizeTo(400, big_ring_resize_duration, Easing.InOutQuint); bigRing.Foreground.Delay(big_ring_foreground_resize_delay).ResizeTo(1, big_ring_fade_duration, Easing.OutExpo); } - duration = full_animation_duration - background_animation_start_time; + int duration = full_animation_duration - background_animation_start_time; using (backgroundFill.BeginDelayedSequence(background_animation_start_time)) { backgroundFill.ResizeHeightTo(1, duration, Easing.InOutQuart); @@ -297,30 +284,30 @@ namespace osu.Game.Screens.Menu duration = full_animation_duration - purple_circle_animation_start_time; using (BeginDelayedSequence(purple_circle_animation_start_time, true)) { - purpleCircle.MoveToY((colored_circle_size - 2) / 2.0f, duration, Easing.InOutQuad); + purpleCircle.MoveToY((circle_size - 2) / 2.0f, duration, Easing.InOutQuad); purpleCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); - purpleCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); + purpleCircle.ResizeTo(circle_size - 2, duration, Easing.InOutQuad); duration -= colored_circles_appear_delay; using (BeginDelayedSequence(colored_circles_appear_delay, true)) { - yellowCircle.MoveToY(-(colored_circle_size - 2) / 2.0f, duration, Easing.InOutQuad); + yellowCircle.MoveToY(-(circle_size - 2) / 2.0f, duration, Easing.InOutQuad); yellowCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); - yellowCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); + yellowCircle.ResizeTo(circle_size - 2, duration, Easing.InOutQuad); duration -= colored_circles_appear_delay; using (BeginDelayedSequence(colored_circles_appear_delay, true)) { - blueCircle.MoveToX(-(colored_circle_size - 2) / 2.0f, duration, Easing.InOutQuad); + blueCircle.MoveToX(-(circle_size - 2) / 2.0f, duration, Easing.InOutQuad); blueCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); - blueCircle.ResizeTo(colored_circle_size - 2, duration, Easing.InOutQuad); + blueCircle.ResizeTo(circle_size - 2, duration, Easing.InOutQuad); duration -= colored_circles_appear_delay; using (BeginDelayedSequence(colored_circles_appear_delay, true)) { - pinkCircle.MoveToX(colored_circle_size / 2.0f, duration, Easing.InOutQuad); + pinkCircle.MoveToX(circle_size / 2.0f, duration, Easing.InOutQuad); pinkCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); - pinkCircle.ResizeTo(colored_circle_size, duration, Easing.InOutQuad); + pinkCircle.ResizeTo(circle_size, duration, Easing.InOutQuad); } } } @@ -340,16 +327,19 @@ namespace osu.Game.Screens.Menu welcomeText.Alpha = 0; smallRing.Size = mediumRing.Size = bigRing.Size = Vector2.Zero; - mediumRing.Foreground.Size = Vector2.One - medium_ring_thickness; - smallRing.Foreground.Size = Vector2.One - small_ring_thickness; - bigRing.Foreground.Size = Vector2.One - big_ring_thickness; - barTopLeft.Size = barTopRight.Size = barBottomLeft.Size = barBottomRight.Size = bar_size; + mediumRing.Foreground.Size = Vector2.One - new Vector2(0.7f); + smallRing.Foreground.Size = Vector2.One - new Vector2(0.4f); + bigRing.Foreground.Size = Vector2.One - new Vector2(0.15f); + + barTopLeft.Size = barTopRight.Size = barBottomLeft.Size = barBottomRight.Size = new Vector2(105, 1.5f); barTopLeft.Alpha = barTopRight.Alpha = barBottomLeft.Alpha = barBottomRight.Alpha = 0; - barTopLeft.Position = new Vector2(-bar_start_offset, -bar_start_offset); - barTopRight.Position = new Vector2(bar_start_offset, -bar_start_offset); - barBottomLeft.Position = new Vector2(-bar_start_offset, bar_start_offset); - barBottomRight.Position = new Vector2(bar_start_offset, bar_start_offset); + + const int bar_offset = 80; + barTopLeft.Position = new Vector2(-bar_offset, -bar_offset); + barTopRight.Position = new Vector2(bar_offset, -bar_offset); + barBottomLeft.Position = new Vector2(-bar_offset, bar_offset); + barBottomRight.Position = new Vector2(bar_offset, bar_offset); backgroundFill.Rotation = foregroundFill.Rotation = 0; backgroundFill.Alpha = foregroundFill.Alpha = 1; @@ -357,10 +347,12 @@ namespace osu.Game.Screens.Menu yellowCircle.Size = purpleCircle.Size = blueCircle.Size = pinkCircle.Size = Vector2.Zero; yellowCircle.Rotation = purpleCircle.Rotation = blueCircle.Rotation = pinkCircle.Rotation = 0; - yellowCircle.Position = new Vector2(0, -colored_circle_offset); - purpleCircle.Position = new Vector2(0, colored_circle_offset); - blueCircle.Position = new Vector2(-colored_circle_offset, 0); - pinkCircle.Position = new Vector2(colored_circle_offset, 0); + + const int circle_offset = 250; + yellowCircle.Position = new Vector2(0, -circle_offset); + purpleCircle.Position = new Vector2(0, circle_offset); + blueCircle.Position = new Vector2(-circle_offset, 0); + pinkCircle.Position = new Vector2(circle_offset, 0); } public void Restart() From b8b05fe8d277fafe6da7c0f5af55105553846716 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 1 Nov 2017 20:54:58 +0900 Subject: [PATCH 26/52] Make the osu! logo shared game-wide There should only ever be one osu! logo. It is now passed around between screens in a superfluous manner. --- osu.Game/Screens/Loader.cs | 14 ++++ osu.Game/Screens/Menu/ButtonSystem.cs | 116 ++++++++++++++++---------- osu.Game/Screens/Menu/Intro.cs | 75 ++++++++++------- osu.Game/Screens/Menu/MainMenu.cs | 26 +++++- osu.Game/Screens/Menu/OsuLogo.cs | 42 ++++++++-- osu.Game/Screens/OsuScreen.cs | 47 +++++++++++ osu.Game/Screens/Play/PlayerLoader.cs | 27 +++--- osu.Game/Screens/Select/Footer.cs | 13 --- osu.Game/Screens/Select/SongSelect.cs | 38 ++++++++- 9 files changed, 289 insertions(+), 109 deletions(-) diff --git a/osu.Game/Screens/Loader.cs b/osu.Game/Screens/Loader.cs index 295b3603be..6de53aeeb0 100644 --- a/osu.Game/Screens/Loader.cs +++ b/osu.Game/Screens/Loader.cs @@ -2,7 +2,9 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using osu.Framework.Allocation; +using osu.Framework.Graphics; using osu.Game.Screens.Menu; +using OpenTK; namespace osu.Game.Screens { @@ -15,6 +17,18 @@ namespace osu.Game.Screens ValidForResume = false; } + protected override void LogoSetup(OsuLogo logo, bool resuming) + { + base.LogoSetup(logo, resuming); + + logo.RelativePositionAxes = Axes.Both; + logo.Triangles = false; + logo.Position = new Vector2(0.9f); + logo.Scale = new Vector2(0.2f); + + logo.FadeInFromZero(5000, Easing.OutQuint); + } + [BackgroundDependencyLoader] private void load(OsuGame game) { diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index e4dbe00a80..9cd92f054f 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -39,12 +39,25 @@ namespace osu.Game.Screens.Menu //todo: make these non-internal somehow. internal const float BUTTON_AREA_HEIGHT = 100; + internal const float BUTTON_WIDTH = 140f; internal const float WEDGE_WIDTH = 20; - public const int EXIT_DELAY = 3000; + private OsuLogo logo; + + public void SetOsuLogo(OsuLogo logo) + { + this.logo = logo; + + if (this.logo != null) + { + this.logo.Action = onOsuLogo; + + // osuLogo.SizeForFlow relies on loading to be complete. + buttonFlow.Position = new Vector2(WEDGE_WIDTH * 2 - (BUTTON_WIDTH + this.logo.SizeForFlow / 4), 0); + } + } - private readonly OsuLogo osuLogo; private readonly Drawable iconFacade; private readonly Container buttonArea; private readonly Box buttonAreaBackground; @@ -99,12 +112,6 @@ namespace osu.Game.Screens.Menu } } }, - osuLogo = new OsuLogo - { - Action = onOsuLogo, - Origin = Anchor.Centre, - Anchor = Anchor.Centre, - } }; buttonsPlay.Add(new Button(@"solo", @"select-6", FontAwesome.fa_user, new Color4(102, 68, 204, 255), () => OnSolo?.Invoke(), WEDGE_WIDTH, Key.P)); @@ -127,14 +134,6 @@ namespace osu.Game.Screens.Menu sampleBack = audio.Sample.Get(@"Menu/select-4"); } - protected override void LoadComplete() - { - base.LoadComplete(); - - // osuLogo.SizeForFlow relies on loading to be complete. - buttonFlow.Position = new Vector2(WEDGE_WIDTH * 2 - (BUTTON_WIDTH + osuLogo.SizeForFlow / 4), 0); - } - protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) { if (args.Repeat) return false; @@ -142,7 +141,7 @@ namespace osu.Game.Screens.Menu switch (args.Key) { case Key.Space: - osuLogo.TriggerOnClick(state); + logo.TriggerOnClick(state); return true; case Key.Escape: switch (State) @@ -215,24 +214,31 @@ namespace osu.Game.Screens.Menu backButton.ContractStyle = 0; settingsButton.ContractStyle = 0; - bool fromInitial = lastState == MenuState.Initial; - if (state == MenuState.TopLevel) buttonArea.FinishTransforms(true); - using (buttonArea.BeginDelayedSequence(fromInitial ? 150 : 0, true)) + using (buttonArea.BeginDelayedSequence(lastState == MenuState.Initial ? 150 : 0, true)) { switch (state) { case MenuState.Exit: case MenuState.Initial: + trackingPosition = false; + buttonAreaBackground.ScaleTo(Vector2.One, 500, Easing.Out); buttonArea.FadeOut(300); - osuLogo.Delay(150) - .Schedule(() => toolbar?.Hide()) - .ScaleTo(1, 800, Easing.OutExpo) - .MoveTo(Vector2.Zero, 800, Easing.OutExpo); + logo?.Delay(150) + .Schedule(() => + { + toolbar?.Hide(); + + logo.ClearTransforms(targetMember: nameof(Position)); + logo.RelativePositionAxes = Axes.Both; + + logo.MoveTo(new Vector2(0.5f), 800, Easing.OutExpo); + logo.ScaleTo(1, 800, Easing.OutExpo); + }); foreach (Button b in buttonsTopLevel) b.State = ButtonState.Contracted; @@ -240,27 +246,40 @@ namespace osu.Game.Screens.Menu foreach (Button b in buttonsPlay) b.State = ButtonState.Contracted; - if (state == MenuState.Exit) - { - osuLogo.RotateTo(20, EXIT_DELAY * 1.5f); - osuLogo.FadeOut(EXIT_DELAY); - } - else if (lastState == MenuState.TopLevel) + if (state != MenuState.Exit && lastState == MenuState.TopLevel) sampleBack?.Play(); break; case MenuState.TopLevel: buttonAreaBackground.ScaleTo(Vector2.One, 200, Easing.Out); - var sequence = osuLogo - .ScaleTo(0.5f, 200, Easing.In) - .MoveTo(buttonFlow.DrawPosition, 200, Easing.In); + logo.ClearTransforms(targetMember: nameof(Position)); + logo.RelativePositionAxes = Axes.None; - if (fromInitial && osuLogo.Scale.X > 0.5f) - sequence.OnComplete(o => - { - o.Impact(); - toolbar?.Show(); - }); + trackingPosition = true; + + switch (lastState) + { + case MenuState.Initial: + logo.ScaleTo(0.5f, 200, Easing.In); + + trackingPosition = false; + logo + .MoveTo(iconTrackingPosition, lastState == MenuState.EnteringMode ? 0 : 200, Easing.In) + .OnComplete(o => + { + trackingPosition = true; + + if (logo.Scale.X > 0.5f) + { + o.Impact(); + toolbar?.Show(); + } + }); + break; + default: + logo.ScaleTo(0.5f, 200, Easing.OutQuint); + break; + } buttonArea.FadeIn(300); @@ -280,6 +299,8 @@ namespace osu.Game.Screens.Menu case MenuState.EnteringMode: buttonAreaBackground.ScaleTo(new Vector2(2, 0), 300, Easing.InSine); + trackingPosition = true; + buttonsTopLevel.ForEach(b => b.ContractStyle = 1); buttonsPlay.ForEach(b => b.ContractStyle = 1); backButton.ContractStyle = 1; @@ -301,15 +322,26 @@ namespace osu.Game.Screens.Menu } } + private Vector2 iconTrackingPosition => logo.Parent.ToLocalSpace(iconFacade.ScreenSpaceDrawQuad.Centre); + + private bool trackingPosition; + + public void SetLogoTracking(bool value) => trackingPosition = value; + protected override void Update() { //if (OsuGame.IdleTime > 6000 && State != MenuState.Exit) // State = MenuState.Initial; - osuLogo.Interactive = Alpha > 0.2f; - - iconFacade.Width = osuLogo.SizeForFlow * 0.5f; base.Update(); + + if (logo != null) + { + if (trackingPosition) + logo.Position = iconTrackingPosition; + + iconFacade.Width = logo.SizeForFlow * 0.5f; + } } } diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index fb06edb0b0..8553f68b9a 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -14,14 +14,13 @@ using osu.Game.Beatmaps.IO; using osu.Game.Configuration; using osu.Game.Graphics.Containers; using osu.Game.Screens.Backgrounds; +using OpenTK; using OpenTK.Graphics; namespace osu.Game.Screens.Menu { public class Intro : OsuScreen { - private readonly OsuLogo logo; - private const string menu_music_beatmap_hash = "3c8b1fcc9434dbb29e2fb613d3b9eada9d7bb6c125ceb32396c3b53437280c83"; /// @@ -39,32 +38,10 @@ namespace osu.Game.Screens.Menu protected override BackgroundScreen CreateBackground() => new BackgroundScreenEmpty(); - public Intro() - { - Children = new Drawable[] - { - new ParallaxContainer - { - ParallaxAmount = 0.01f, - Children = new Drawable[] - { - logo = new OsuLogo - { - Alpha = 0, - Triangles = false, - Blending = BlendingMode.Additive, - Interactive = false, - Colour = Color4.DarkGray, - Ripple = false - } - } - } - }; - } - private Bindable menuVoice; private Bindable menuMusic; private Track track; + private readonly ParallaxContainer parallax; [BackgroundDependencyLoader] private void load(AudioManager audio, OsuConfigManager config, BeatmapManager beatmaps, Framework.Game game) @@ -121,14 +98,48 @@ namespace osu.Game.Screens.Menu { DidLoadMenu = true; Push(mainMenu); - }, 2300); - }, 600); + }, delay_step_one); + }, delay_step_two); + } - logo.ScaleTo(0.4f); - logo.FadeOut(); + private const double delay_step_one = 2300; + private const double delay_step_two = 600; - logo.ScaleTo(1, 4400, Easing.OutQuint); - logo.FadeIn(20000, Easing.OutQuint); + public const int EXIT_DELAY = 3000; + + protected override void LogoSetup(OsuLogo logo, bool resuming) + { + base.LogoSetup(logo, resuming); + + logo.RelativePositionAxes = Axes.Both; + + logo.Triangles = false; + logo.Colour = Color4.DarkGray; + logo.Ripple = false; + + const int quick_appear = 150; + + int initialMovementTime = logo.Alpha > 0.2f ? quick_appear : 0; + + logo.MoveTo(new Vector2(0.5f), initialMovementTime, Easing.OutQuint); + + if (!resuming) + { + logo.ScaleTo(0.4f); + logo.FadeOut(); + + logo.ScaleTo(1, delay_step_one + delay_step_two, Easing.OutQuint); + logo.FadeIn(delay_step_one + delay_step_two, Easing.OutQuint); + } + else + { + logo + .ScaleTo(1, initialMovementTime, Easing.OutQuint) + .FadeIn(quick_appear, Easing.OutQuint) + .Then() + .RotateTo(20, EXIT_DELAY * 1.5f) + .FadeOut(EXIT_DELAY); + } } protected override void OnSuspending(Screen next) @@ -148,7 +159,7 @@ namespace osu.Game.Screens.Menu if (!(last is MainMenu)) Content.FadeIn(300); - double fadeOutTime = 2000; + double fadeOutTime = EXIT_DELAY; //we also handle the exit transition. if (menuVoice) seeya.Play(); diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index ff902bf28b..77e45c4575 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -2,6 +2,7 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using OpenTK; +using OpenTK.Graphics; using OpenTK.Input; using osu.Framework.Allocation; using osu.Framework.Graphics; @@ -102,6 +103,29 @@ namespace osu.Game.Screens.Menu Beatmap.ValueChanged += beatmap_ValueChanged; } + protected override void LogoSetup(OsuLogo logo, bool resuming) + { + base.LogoSetup(logo, resuming); + + buttons.SetOsuLogo(logo); + + logo.Triangles = true; + logo.Ripple = false; + + logo.FadeColour(Color4.White, 100, Easing.OutQuint); + logo.FadeIn(100, Easing.OutQuint); + + if (resuming) + buttons.State = MenuState.TopLevel; + } + + protected override void LogoOnSuspending(OsuLogo logo) + { + logo.FadeOut(300, Easing.InSine) + .ScaleTo(0.2f, 300, Easing.InSine) + .OnComplete(l => buttons.SetOsuLogo(null)); + } + private void beatmap_ValueChanged(WorkingBeatmap newValue) { if (!IsCurrentScreen) @@ -135,8 +159,6 @@ namespace osu.Game.Screens.Menu const float length = 300; - buttons.State = MenuState.TopLevel; - Content.FadeIn(length, Easing.OutQuint); Content.MoveTo(new Vector2(0, 0), length, Easing.OutQuint); diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index 6f4a46b10b..297076a78b 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -29,6 +29,8 @@ namespace osu.Game.Screens.Menu { public readonly Color4 OsuPink = OsuColour.FromHex(@"e967a1"); + private const double transition_length = 300; + private readonly Sprite logo; private readonly CircularContainer logoContainer; private readonly Container logoBounceContainer; @@ -54,7 +56,7 @@ namespace osu.Game.Screens.Menu public bool Triangles { - set { colourAndTriangles.Alpha = value ? 1 : 0; } + set { colourAndTriangles.FadeTo(value ? 1 : 0, transition_length, Easing.OutQuint); } } public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => logoContainer.ReceiveMouseInputAt(screenSpacePos); @@ -62,10 +64,9 @@ namespace osu.Game.Screens.Menu public bool Ripple { get { return rippleContainer.Alpha > 0; } - set { rippleContainer.Alpha = value ? 1 : 0; } + set { rippleContainer.FadeTo(value ? 1 : 0, transition_length, Easing.OutQuint); } } - public bool Interactive = true; private readonly Box flashLayer; private readonly Container impactContainer; @@ -76,11 +77,12 @@ namespace osu.Game.Screens.Menu public OsuLogo() { + AlwaysPresent = true; + EarlyActivationMilliseconds = early_activation; Size = new Vector2(default_size); - Anchor = Anchor.Centre; Origin = Anchor.Centre; AutoSizeAxes = Axes.Both; @@ -222,6 +224,27 @@ namespace osu.Game.Screens.Menu ripple.Texture = textures.Get(@"Menu/logo"); } + private double? reservationEndTime; + private Action reservationCallback; + + private bool canFulfillReservation => !reservationEndTime.HasValue || reservationEndTime <= Time.Current; + + public void RequestUsage(Action callback) + { + reservationCallback = callback; + } + + private void fulfillReservation() + { + reservationCallback(this); + reservationCallback = null; + } + + public void ReserveFor(float duration) + { + reservationEndTime = Time.Current + duration; + } + private int lastBeatIndex; protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes) @@ -288,11 +311,16 @@ namespace osu.Game.Screens.Menu { triangles.Velocity = paused_velocity; } + + if (reservationCallback != null && canFulfillReservation) + fulfillReservation(); } + private bool interactive => Action != null && Alpha > 0.2f; + protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) { - if (!Interactive) return false; + if (!interactive) return false; logoBounceContainer.ScaleTo(0.9f, 1000, Easing.Out); return true; @@ -306,7 +334,7 @@ namespace osu.Game.Screens.Menu protected override bool OnClick(InputState state) { - if (!Interactive) return false; + if (!interactive) return false; sampleClick.Play(); @@ -320,7 +348,7 @@ namespace osu.Game.Screens.Menu protected override bool OnHover(InputState state) { - if (!Interactive) return false; + if (!interactive) return false; logoHoverContainer.ScaleTo(1.1f, 500, Easing.OutElastic); return true; diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs index 2a3cba0d49..412fe02d30 100644 --- a/osu.Game/Screens/OsuScreen.cs +++ b/osu.Game/Screens/OsuScreen.cs @@ -10,7 +10,9 @@ using osu.Game.Graphics.Containers; using OpenTK; using osu.Framework.Audio.Sample; using osu.Framework.Audio; +using osu.Framework.Graphics; using osu.Game.Rulesets; +using osu.Game.Screens.Menu; namespace osu.Game.Screens { @@ -30,6 +32,8 @@ namespace osu.Game.Screens public virtual bool HasLocalCursorDisplayed => false; + private OsuLogo logo; + /// /// Whether the beatmap or ruleset should be allowed to be changed by the user or game. /// Used to mark exclusive areas where this is strongly prohibited, like gameplay. @@ -72,9 +76,16 @@ namespace osu.Game.Screens protected override void OnResuming(Screen last) { base.OnResuming(last); + logo.WaitForTransforms().Schedule(() => logoSetup(true)); sampleExit?.Play(); } + protected override void OnSuspending(Screen next) + { + base.OnSuspending(next); + logoOnSuspending(); + } + protected override void OnEntering(Screen last) { OsuScreen lastOsu = last as OsuScreen; @@ -106,11 +117,19 @@ namespace osu.Game.Screens }); } + if ((logo = lastOsu?.logo) == null) + AddInternal(logo = new OsuLogo()); + base.OnEntering(last); + + logo.WaitForTransforms().Schedule(() => logoSetup(false)); } protected override bool OnExiting(Screen next) { + if (ValidForResume && logo != null) + logoOnExiting(); + OsuScreen nextOsu = next as OsuScreen; if (Background != null && !Background.Equals(nextOsu?.Background)) @@ -128,5 +147,33 @@ namespace osu.Game.Screens Beatmap.UnbindAll(); return false; } + + private void logoSetup(bool resuming) => LogoSetup(logo, resuming); + + protected virtual void LogoSetup(OsuLogo logo, bool resuming) + { + logo.Action = null; + logo.FadeOut(300, Easing.OutQuint); + } + + private void logoOnExiting() + { + logo.ClearTransforms(); + LogoOnExiting(logo); + } + + protected virtual void LogoOnExiting(OsuLogo logo) + { + } + + private void logoOnSuspending() + { + logo.ClearTransforms(); + LogoOnSuspending(logo); + } + + protected virtual void LogoOnSuspending(OsuLogo logo) + { + } } } diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index 71c2ec9a6d..054b4c0a0f 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -10,9 +10,9 @@ using osu.Game.Beatmaps; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; using osu.Game.Screens.Backgrounds; -using osu.Game.Screens.Menu; using OpenTK; using osu.Framework.Localisation; +using osu.Game.Screens.Menu; namespace osu.Game.Screens.Play { @@ -20,7 +20,6 @@ namespace osu.Game.Screens.Play { private Player player; - private readonly OsuLogo logo; private BeatmapMetadataDisplay info; private bool showOverlays = true; @@ -39,15 +38,6 @@ namespace osu.Game.Screens.Play showOverlays = false; ValidForResume = true; }; - - Children = new Drawable[] - { - logo = new OsuLogo - { - Scale = new Vector2(0.15f), - Interactive = false, - }, - }; } [BackgroundDependencyLoader] @@ -101,11 +91,24 @@ namespace osu.Game.Screens.Play contentIn(); - logo.Delay(500).MoveToOffset(new Vector2(0, -180), 500, Easing.InOutExpo); info.Delay(750).FadeIn(500); this.Delay(2150).Schedule(pushWhenLoaded); } + protected override void LogoSetup(OsuLogo logo, bool resuming) + { + base.LogoSetup(logo, resuming); + + logo.ClearTransforms(targetMember: nameof(Position)); + logo.RelativePositionAxes = Axes.Both; + + logo.ScaleTo(new Vector2(0.15f), 300, Easing.In); + logo.MoveTo(new Vector2(0.5f), 300, Easing.In); + logo.FadeIn(); + + logo.Delay(500).MoveToOffset(new Vector2(0, -0.24f), 500, Easing.InOutExpo); + } + private void pushWhenLoaded() { if (player.LoadState != LoadState.Ready) diff --git a/osu.Game/Screens/Select/Footer.cs b/osu.Game/Screens/Select/Footer.cs index 00f311e522..40c3cf0fd4 100644 --- a/osu.Game/Screens/Select/Footer.cs +++ b/osu.Game/Screens/Select/Footer.cs @@ -13,7 +13,6 @@ using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Shapes; using osu.Framework.Input; using osu.Game.Graphics.UserInterface; -using osu.Game.Screens.Menu; namespace osu.Game.Screens.Select { @@ -31,12 +30,9 @@ namespace osu.Game.Screens.Select private const float padding = 80; public Action OnBack; - public Action OnStart; private readonly FillFlowContainer buttons; - public OsuLogo StartButton; - /// Text on the button. /// Colour of the button. /// Hotkey of the button. @@ -106,13 +102,6 @@ namespace osu.Game.Screens.Select Height = 3, Position = new Vector2(0, -3), }, - StartButton = new OsuLogo - { - Anchor = Anchor.BottomRight, - Scale = new Vector2(0.4f), - Position = new Vector2(-70, -25), - Action = () => OnStart?.Invoke() - }, new BackButton { Anchor = Anchor.BottomLeft, @@ -143,8 +132,6 @@ namespace osu.Game.Screens.Select updateModeLight(); } - public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => base.ReceiveMouseInputAt(screenSpacePos) || StartButton.ReceiveMouseInputAt(screenSpacePos); - protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true; protected override bool OnClick(InputState state) => true; diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index e11eed7040..f9e3b0902d 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -20,6 +20,7 @@ using osu.Game.Graphics.Containers; using osu.Game.Overlays; using osu.Game.Screens.Backgrounds; using osu.Game.Screens.Edit; +using osu.Game.Screens.Menu; using osu.Game.Screens.Select.Options; namespace osu.Game.Screens.Select @@ -153,7 +154,6 @@ namespace osu.Game.Screens.Select Add(Footer = new Footer { OnBack = Exit, - OnStart = () => carouselRaisedStart(), }); FooterPanels.Add(BeatmapOptions = new BeatmapOptionsOverlay()); @@ -309,6 +309,41 @@ namespace osu.Game.Screens.Select FilterControl.Activate(); } + private const double logo_transition = 250; + + protected override void LogoSetup(OsuLogo logo, bool resuming) + { + base.LogoSetup(logo, resuming); + + logo.ClearTransforms(); + logo.RelativePositionAxes = Axes.Both; + + Vector2 position = new Vector2(0.95f, 0.96f); + + if (logo.Alpha > 0.8f) + { + logo.MoveTo(position, 500, Easing.OutQuint); + } + else + { + logo.Hide(); + logo.ScaleTo(0.2f); + logo.MoveTo(position); + } + + logo.FadeIn(logo_transition, Easing.OutQuint); + logo.ScaleTo(0.4f, logo_transition, Easing.OutQuint); + + logo.Action = () => carouselRaisedStart(); + } + + protected override void LogoOnExiting(OsuLogo logo) + { + base.LogoOnExiting(logo); + logo.ScaleTo(0.2f, logo_transition, Easing.OutQuint); + logo.FadeOut(logo_transition, Easing.OutQuint); + } + private void beatmap_ValueChanged(WorkingBeatmap beatmap) { if (!IsCurrentScreen) return; @@ -350,6 +385,7 @@ namespace osu.Game.Screens.Select Content.FadeOut(100); FilterControl.Deactivate(); + return base.OnExiting(next); } From 9b2d41f4eb19a5cb729d45e28d7b9d20b932bca4 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 2 Nov 2017 21:52:01 +0900 Subject: [PATCH 27/52] Fix quick retry looking bad --- osu.Game/Screens/Play/PlayerLoader.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index 054b4c0a0f..e53026fb8d 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -104,9 +104,9 @@ namespace osu.Game.Screens.Play logo.ScaleTo(new Vector2(0.15f), 300, Easing.In); logo.MoveTo(new Vector2(0.5f), 300, Easing.In); - logo.FadeIn(); + logo.FadeIn(350); - logo.Delay(500).MoveToOffset(new Vector2(0, -0.24f), 500, Easing.InOutExpo); + logo.Delay(resuming ? 0 : 500).MoveToOffset(new Vector2(0, -0.24f), 500, Easing.InOutExpo); } private void pushWhenLoaded() From c99ffb4aa39dbea7b0789a1b97d9bb78d47e17ef Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 2 Nov 2017 21:52:12 +0900 Subject: [PATCH 28/52] Fix potential nullref --- osu.Game/Screens/Menu/ButtonSystem.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index 9cd92f054f..6f9b77e18e 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -141,7 +141,7 @@ namespace osu.Game.Screens.Menu switch (args.Key) { case Key.Space: - logo.TriggerOnClick(state); + logo?.TriggerOnClick(state); return true; case Key.Escape: switch (State) From 8f78d84ad6617ba4365cd7dd86c3f4875c9b404b Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 2 Nov 2017 21:52:23 +0900 Subject: [PATCH 29/52] Make intro resume slower --- osu.Game/Screens/Menu/Intro.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 8553f68b9a..dcf4a00a9a 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -117,7 +117,7 @@ namespace osu.Game.Screens.Menu logo.Colour = Color4.DarkGray; logo.Ripple = false; - const int quick_appear = 150; + const int quick_appear = 350; int initialMovementTime = logo.Alpha > 0.2f ? quick_appear : 0; From 6a206c616baff0070ab852f6136a032864f40093 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 3 Nov 2017 14:34:12 +0900 Subject: [PATCH 30/52] Update in line with framework changes --- osu.Game/Screens/OsuScreen.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs index 412fe02d30..5ecfcd8e8d 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.WaitForTransforms().Schedule(() => logoSetup(true)); + logo.DelayUntilTransformsFinished().Schedule(() => logoSetup(true)); sampleExit?.Play(); } @@ -122,7 +122,7 @@ namespace osu.Game.Screens base.OnEntering(last); - logo.WaitForTransforms().Schedule(() => logoSetup(false)); + logo.DelayUntilTransformsFinished().Schedule(() => logoSetup(false)); } protected override bool OnExiting(Screen next) From 3adcfa8c385c74a9a3785a246f39126c31335773 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 3 Nov 2017 17:54:35 +0900 Subject: [PATCH 31/52] Many fixes --- ...tCaseIntro.cs => TestCaseIntroSequence.cs} | 15 +- osu.Game.Tests/osu.Game.Tests.csproj | 2 +- osu.Game/Screens/Menu/IntroSequence.cs | 191 ++++++------------ osu.Game/Screens/Menu/LogoVisualisation.cs | 2 +- osu.Game/Screens/Menu/OsuLogo.cs | 17 ++ 5 files changed, 95 insertions(+), 132 deletions(-) rename osu.Game.Tests/Visual/{TestCaseIntro.cs => TestCaseIntroSequence.cs} (75%) diff --git a/osu.Game.Tests/Visual/TestCaseIntro.cs b/osu.Game.Tests/Visual/TestCaseIntroSequence.cs similarity index 75% rename from osu.Game.Tests/Visual/TestCaseIntro.cs rename to osu.Game.Tests/Visual/TestCaseIntroSequence.cs index a2375a592e..ba5cf8ef46 100644 --- a/osu.Game.Tests/Visual/TestCaseIntro.cs +++ b/osu.Game.Tests/Visual/TestCaseIntroSequence.cs @@ -12,16 +12,16 @@ using osu.Game.Screens.Menu; namespace osu.Game.Tests.Visual { - public class TestCaseIntro : OsuTestCase + public class TestCaseIntroSequence : OsuTestCase { public override IReadOnlyList RequiredTypes => new[] { - typeof(IntroSequence) + typeof(OsuLogo), }; - public TestCaseIntro() + public TestCaseIntroSequence() { - IntroSequence intro; + OsuLogo logo; var rateAdjustClock = new StopwatchClock(true); var framedClock = new FramedClock(rateAdjustClock); @@ -38,11 +38,14 @@ namespace osu.Game.Tests.Visual RelativeSizeAxes = Axes.Both, Colour = Color4.Black, }, - intro = new IntroSequence(), + logo = new OsuLogo + { + Anchor = Anchor.Centre, + } } }); - AddStep(@"Restart", intro.Restart); + AddStep(@"Restart", logo.PlayIntro); AddSliderStep("Playback speed", 0.0, 2.0, 1, v => rateAdjustClock.Rate = v); } } diff --git a/osu.Game.Tests/osu.Game.Tests.csproj b/osu.Game.Tests/osu.Game.Tests.csproj index 31d48097f9..4cc06df609 100644 --- a/osu.Game.Tests/osu.Game.Tests.csproj +++ b/osu.Game.Tests/osu.Game.Tests.csproj @@ -110,7 +110,7 @@ - + diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 37c891a13a..8ca2bbaf14 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -1,6 +1,7 @@ // Copyright (c) 2007-2017 ppy Pty Ltd . // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE +using System; using OpenTK; using OpenTK.Graphics; using osu.Framework.Extensions.Color4Extensions; @@ -15,12 +16,10 @@ namespace osu.Game.Screens.Menu public class IntroSequence : Container { //Size - private const int logo_size = 460; //todo: this should probably be 480 + private const float logo_size = 460; //todo: this should probably be 480 private readonly OsuSpriteText welcomeText; - private readonly OsuLogo logo; - private readonly Container barsContainer; private readonly Container barTopLeft; @@ -185,144 +184,95 @@ namespace osu.Game.Screens.Menu Colour = OsuColour.FromHex(@"e967a1"), } }, - logo = new OsuLogo - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Ripple = false, - Interactive = false, - Blending = BlendingMode.Additive, - }, }; - - setDefaults(); } - public void Start() + public void Start(double length) { - const int circle_size = 416; + FinishTransforms(true); + setDefaults(); - //Time - const int full_animation_duration = 2950; + mediumRing.ResizeTo(130, 360, Easing.InExpo).OnComplete(r => r.Foreground.ResizeTo(1, 420, Easing.OutQuad)); - const int medium_ring_resize_duration = 360; - const int medium_ring_fade_duration = 420; - - const int small_ring_resize_duration = 250; - const int small_ring_fade_duration = 650; - - const int text_fade_duration = 700; - const int text_spacing_transform_duration = 1500; - - const int bar_animation_duration = 700; - const int bar_resize_delay = 150; - - const int big_ring_animation_start_delay = 2000; - const int big_ring_resize_duration = 500; - const int big_ring_foreground_resize_delay = 250; - const int big_ring_fade_duration = 450; - - const int background_animation_start_time = 2250; - const int foreground_animation_start_time = 2300; - - const int colored_circle_rotation_delay = 110; - const int colored_circles_appear_delay = 80; - const int purple_circle_animation_start_time = 2250; - - const int logo_fade_duration = 300; - - //Position - const int bar_end_offset = 120; - - mediumRing.ResizeTo(130, medium_ring_resize_duration, Easing.InExpo); + Func remainingTime = () => length - TransformDelay; using (BeginDelayedSequence(200, true)) { - welcomeText.FadeIn(text_fade_duration); - welcomeText.TransformSpacingTo(new Vector2(20, 0), text_spacing_transform_duration, Easing.Out); + welcomeText.FadeIn(700); + welcomeText.TransformSpacingTo(new Vector2(20, 0), 1500, Easing.Out); - smallRing.ResizeTo(40, small_ring_resize_duration, Easing.InExpo); - smallRing.Foreground.Delay(small_ring_resize_duration).ResizeTo(1, small_ring_fade_duration, Easing.OutQuad); - } + smallRing.ResizeTo(logo_size * 0.086f, 250, Easing.InExpo).OnComplete(r => r.Foreground.ResizeTo(1, 650, Easing.OutQuad)); - using (BeginDelayedSequence(medium_ring_resize_duration, true)) - { - mediumRing.Foreground.ResizeTo(1, medium_ring_fade_duration, Easing.OutQuad); - - foreach (var bar in barsContainer) + using (BeginDelayedSequence(160, true)) { - bar.FadeIn(); - bar.Delay(bar_resize_delay).ResizeWidthTo(0, bar_animation_duration - bar_resize_delay, Easing.OutQuint); - } + const int bar_duration = 700; + const int bar_resize = 150; - barTopLeft.MoveTo(new Vector2(-bar_end_offset, -bar_end_offset), bar_animation_duration, Easing.OutQuint); - barTopRight.MoveTo(new Vector2(bar_end_offset, -bar_end_offset), bar_animation_duration, Easing.OutQuint); - barBottomLeft.MoveTo(new Vector2(-bar_end_offset, bar_end_offset), bar_animation_duration, Easing.OutQuint); - barBottomRight.MoveTo(new Vector2(bar_end_offset, bar_end_offset), bar_animation_duration, Easing.OutQuint); - } - - using (bigRing.BeginDelayedSequence(big_ring_animation_start_delay, true)) - { - bigRing.ResizeTo(400, big_ring_resize_duration, Easing.InOutQuint); - bigRing.Foreground.Delay(big_ring_foreground_resize_delay).ResizeTo(1, big_ring_fade_duration, Easing.OutExpo); - } - - int duration = full_animation_duration - background_animation_start_time; - using (backgroundFill.BeginDelayedSequence(background_animation_start_time)) - { - backgroundFill.ResizeHeightTo(1, duration, Easing.InOutQuart); - backgroundFill.RotateTo(-90, duration, Easing.InOutQuart); - } - - duration = full_animation_duration - foreground_animation_start_time; - using (foregroundFill.BeginDelayedSequence(foreground_animation_start_time)) - { - foregroundFill.ResizeWidthTo(1, duration, Easing.InOutQuart); - foregroundFill.RotateTo(-90, duration, Easing.InOutQuart); - } - - duration = full_animation_duration - purple_circle_animation_start_time; - using (BeginDelayedSequence(purple_circle_animation_start_time, true)) - { - purpleCircle.MoveToY((circle_size - 2) / 2.0f, duration, Easing.InOutQuad); - purpleCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); - purpleCircle.ResizeTo(circle_size - 2, duration, Easing.InOutQuad); - - duration -= colored_circles_appear_delay; - using (BeginDelayedSequence(colored_circles_appear_delay, true)) - { - yellowCircle.MoveToY(-(circle_size - 2) / 2.0f, duration, Easing.InOutQuad); - yellowCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); - yellowCircle.ResizeTo(circle_size - 2, duration, Easing.InOutQuad); - - duration -= colored_circles_appear_delay; - using (BeginDelayedSequence(colored_circles_appear_delay, true)) + foreach (var bar in barsContainer) { - blueCircle.MoveToX(-(circle_size - 2) / 2.0f, duration, Easing.InOutQuad); - blueCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); - blueCircle.ResizeTo(circle_size - 2, duration, Easing.InOutQuad); + bar.FadeIn(); + bar.Delay(bar_resize).ResizeWidthTo(0, bar_duration - bar_resize, Easing.OutQuint); + } - duration -= colored_circles_appear_delay; - using (BeginDelayedSequence(colored_circles_appear_delay, true)) + const int bar_end_offset = 120; + barTopLeft.MoveTo(new Vector2(-bar_end_offset, -bar_end_offset), bar_duration, Easing.OutQuint); + barTopRight.MoveTo(new Vector2(bar_end_offset, -bar_end_offset), bar_duration, Easing.OutQuint); + barBottomLeft.MoveTo(new Vector2(-bar_end_offset, bar_end_offset), bar_duration, Easing.OutQuint); + barBottomRight.MoveTo(new Vector2(bar_end_offset, bar_end_offset), bar_duration, Easing.OutQuint); + + using (BeginDelayedSequence(1640, true)) // 2000 + { + bigRing.ResizeTo(logo_size * 0.86f, 500, Easing.InOutQuint); + bigRing.Foreground.Delay(250).ResizeTo(1, 450, Easing.OutExpo); + + using (BeginDelayedSequence(250, true)) // 2250 { - pinkCircle.MoveToX(circle_size / 2.0f, duration, Easing.InOutQuad); - pinkCircle.Delay(colored_circle_rotation_delay).RotateTo(-180, duration - colored_circle_rotation_delay, Easing.OutQuad); - pinkCircle.ResizeTo(circle_size, duration, Easing.InOutQuad); + backgroundFill.ResizeHeightTo(1, remainingTime(), Easing.InOutQuart); + backgroundFill.RotateTo(-90, remainingTime(), Easing.InOutQuart); + + using (BeginDelayedSequence(50, true)) + { + foregroundFill.ResizeWidthTo(1, remainingTime(), Easing.InOutQuart); + foregroundFill.RotateTo(-90, remainingTime(), Easing.InOutQuart); + } + + const float circle_size = logo_size * 0.9f; + + const int rotation_delay = 110; + const int appear_delay = 80; + + purpleCircle.MoveToY(circle_size / 2, remainingTime(), Easing.InOutQuad); + purpleCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); + purpleCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); + + using (BeginDelayedSequence(appear_delay, true)) + { + yellowCircle.MoveToY(-circle_size / 2, remainingTime(), Easing.InOutQuad); + yellowCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); + yellowCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); + + using (BeginDelayedSequence(appear_delay, true)) + { + blueCircle.MoveToX(-circle_size / 2, remainingTime(), Easing.InOutQuad); + blueCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); + blueCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); + + using (BeginDelayedSequence(appear_delay, true)) + { + pinkCircle.MoveToX(circle_size / 2, remainingTime(), Easing.InOutQuad); + pinkCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); + pinkCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); + } + } + } } } } } - - logo.Delay(full_animation_duration).FadeIn(logo_fade_duration); - - backgroundFill.Delay(full_animation_duration + logo_fade_duration).FadeOut(); - foregroundFill.Delay(full_animation_duration + logo_fade_duration).FadeOut(); } private void setDefaults() { - logo.Alpha = 0; - welcomeText.Spacing = new Vector2(5); welcomeText.Alpha = 0; @@ -355,13 +305,6 @@ namespace osu.Game.Screens.Menu pinkCircle.Position = new Vector2(circle_offset, 0); } - public void Restart() - { - FinishTransforms(true); - setDefaults(); - Start(); - } - private class Ring : Container { public readonly CircularContainer Foreground; diff --git a/osu.Game/Screens/Menu/LogoVisualisation.cs b/osu.Game/Screens/Menu/LogoVisualisation.cs index 4b8942349d..3e7662a441 100644 --- a/osu.Game/Screens/Menu/LogoVisualisation.cs +++ b/osu.Game/Screens/Menu/LogoVisualisation.cs @@ -19,7 +19,7 @@ using osu.Framework.Allocation; namespace osu.Game.Screens.Menu { - internal class LogoVisualisation : Drawable, IHasAccentColour + public class LogoVisualisation : Drawable, IHasAccentColour { private readonly Bindable beatmap = new Bindable(); diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index 297076a78b..6215cb5660 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -39,6 +39,8 @@ namespace osu.Game.Screens.Menu private readonly Container logoHoverContainer; private readonly LogoVisualisation visualizer; + private readonly IntroSequence intro; + private SampleChannel sampleClick; private SampleChannel sampleBeat; @@ -89,6 +91,10 @@ namespace osu.Game.Screens.Menu Children = new Drawable[] { + intro = new IntroSequence + { + RelativeSizeAxes = Axes.Both, + }, logoHoverContainer = new Container { AutoSizeAxes = Axes.Both, @@ -289,6 +295,17 @@ namespace osu.Game.Screens.Menu } } + public void PlayIntro() + { + const double length = 2950; + const double fade = 300; + + logoHoverContainer.FadeOut().Delay(length).FadeIn(fade); + intro.Show(); + intro.Start(length); + intro.Delay(length + fade).FadeOut(); + } + protected override void Update() { base.Update(); From 8d610cfd434c573f3ff1389cf1050937280bdf5e Mon Sep 17 00:00:00 2001 From: Shane Woolcock Date: Mon, 6 Nov 2017 16:57:51 +1030 Subject: [PATCH 32/52] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 3c074a0981..2de91c4f0c 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 3c074a0981844fbaa9f2ecbf879c542f07e2b94d +Subproject commit 2de91c4f0cce97a4a18229d4d63685111ec06c61 From a7c7f7d690b0c17f009d91c737280883b9baaa0c Mon Sep 17 00:00:00 2001 From: Shane Woolcock Date: Mon, 6 Nov 2017 16:58:17 +1030 Subject: [PATCH 33/52] Add precision values to some of the config bindables --- osu.Game/Configuration/OsuConfigManager.cs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index b000f08369..9598372d2d 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -16,12 +16,12 @@ namespace osu.Game.Configuration Set(OsuSetting.Ruleset, 0, 0, int.MaxValue); Set(OsuSetting.BeatmapDetailTab, BeatmapDetailTab.Details); - Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10); - Set(OsuSetting.DisplayStarsMaximum, 10.0, 0, 10); + Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10, 0.1); + Set(OsuSetting.DisplayStarsMaximum, 10.0, 0, 10, 0.1); Set(OsuSetting.SelectionRandomType, SelectionRandomType.RandomPermutation); - Set(OsuSetting.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2, 1); + Set(OsuSetting.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2, 1, 0.01); // Online settings Set(OsuSetting.Username, string.Empty); @@ -41,11 +41,11 @@ namespace osu.Game.Configuration Set(OsuSetting.MenuVoice, true); Set(OsuSetting.MenuMusic, true); - Set(OsuSetting.AudioOffset, 0, -500.0, 500.0); + Set(OsuSetting.AudioOffset, 0, -500.0, 500.0, 1); // Input - Set(OsuSetting.MenuCursorSize, 1.0, 0.5f, 2); - Set(OsuSetting.GameplayCursorSize, 1.0, 0.5f, 2); + Set(OsuSetting.MenuCursorSize, 1.0, 0.5f, 2, 0.01); + Set(OsuSetting.GameplayCursorSize, 1.0, 0.5f, 2, 0.01); Set(OsuSetting.AutoCursorSize, false); Set(OsuSetting.MouseDisableButtons, false); @@ -63,13 +63,13 @@ namespace osu.Game.Configuration Set(OsuSetting.SnakingOutSliders, true); // Gameplay - Set(OsuSetting.DimLevel, 0.3, 0, 1); + Set(OsuSetting.DimLevel, 0.3, 0, 1, 0.01); Set(OsuSetting.ShowInterface, true); Set(OsuSetting.KeyOverlay, false); Set(OsuSetting.FloatingComments, false); - Set(OsuSetting.PlaybackSpeed, 1.0, 0.5f, 2); + Set(OsuSetting.PlaybackSpeed, 1.0, 0.5f, 2, 0.01); // Update Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer); From 97b238d0847d7c86da8bffb66de3e2af533eacce Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 11:20:21 +0900 Subject: [PATCH 34/52] Simplify intro sequence a bit more --- osu.Game/Screens/Menu/IntroSequence.cs | 92 ++++++++++++-------------- 1 file changed, 44 insertions(+), 48 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 8ca2bbaf14..54e6d74189 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -193,76 +193,72 @@ namespace osu.Game.Screens.Menu setDefaults(); mediumRing.ResizeTo(130, 360, Easing.InExpo).OnComplete(r => r.Foreground.ResizeTo(1, 420, Easing.OutQuad)); + smallRing.ResizeTo(logo_size * 0.086f, 250, Easing.InExpo).OnComplete(r => r.Foreground.ResizeTo(1, 650, Easing.OutQuad)); Func remainingTime = () => length - TransformDelay; - using (BeginDelayedSequence(200, true)) + using (BeginDelayedSequence(360, true)) { welcomeText.FadeIn(700); - welcomeText.TransformSpacingTo(new Vector2(20, 0), 1500, Easing.Out); + welcomeText.TransformSpacingTo(new Vector2(20, 0), remainingTime(), Easing.Out); - smallRing.ResizeTo(logo_size * 0.086f, 250, Easing.InExpo).OnComplete(r => r.Foreground.ResizeTo(1, 650, Easing.OutQuad)); + const int bar_duration = 700; + const int bar_resize = 150; - using (BeginDelayedSequence(160, true)) + foreach (var bar in barsContainer) { - const int bar_duration = 700; - const int bar_resize = 150; + bar.FadeIn(); + bar.Delay(bar_resize).ResizeWidthTo(0, bar_duration - bar_resize, Easing.OutQuint); + } - foreach (var bar in barsContainer) + const int bar_end_offset = 120; + barTopLeft.MoveTo(new Vector2(-bar_end_offset, -bar_end_offset), bar_duration, Easing.OutQuint); + barTopRight.MoveTo(new Vector2(bar_end_offset, -bar_end_offset), bar_duration, Easing.OutQuint); + barBottomLeft.MoveTo(new Vector2(-bar_end_offset, bar_end_offset), bar_duration, Easing.OutQuint); + barBottomRight.MoveTo(new Vector2(bar_end_offset, bar_end_offset), bar_duration, Easing.OutQuint); + + using (BeginDelayedSequence(1640, true)) // 2000 + { + bigRing.ResizeTo(logo_size * 0.86f, 500, Easing.InOutQuint); + bigRing.Foreground.Delay(250).ResizeTo(1, 450, Easing.OutExpo); + + using (BeginDelayedSequence(250, true)) // 2250 { - bar.FadeIn(); - bar.Delay(bar_resize).ResizeWidthTo(0, bar_duration - bar_resize, Easing.OutQuint); - } + backgroundFill.ResizeHeightTo(1, remainingTime(), Easing.InOutQuart); + backgroundFill.RotateTo(-90, remainingTime(), Easing.InOutQuart); - const int bar_end_offset = 120; - barTopLeft.MoveTo(new Vector2(-bar_end_offset, -bar_end_offset), bar_duration, Easing.OutQuint); - barTopRight.MoveTo(new Vector2(bar_end_offset, -bar_end_offset), bar_duration, Easing.OutQuint); - barBottomLeft.MoveTo(new Vector2(-bar_end_offset, bar_end_offset), bar_duration, Easing.OutQuint); - barBottomRight.MoveTo(new Vector2(bar_end_offset, bar_end_offset), bar_duration, Easing.OutQuint); - - using (BeginDelayedSequence(1640, true)) // 2000 - { - bigRing.ResizeTo(logo_size * 0.86f, 500, Easing.InOutQuint); - bigRing.Foreground.Delay(250).ResizeTo(1, 450, Easing.OutExpo); - - using (BeginDelayedSequence(250, true)) // 2250 + using (BeginDelayedSequence(50, true)) { - backgroundFill.ResizeHeightTo(1, remainingTime(), Easing.InOutQuart); - backgroundFill.RotateTo(-90, remainingTime(), Easing.InOutQuart); + foregroundFill.ResizeWidthTo(1, remainingTime(), Easing.InOutQuart); + foregroundFill.RotateTo(-90, remainingTime(), Easing.InOutQuart); + } - using (BeginDelayedSequence(50, true)) - { - foregroundFill.ResizeWidthTo(1, remainingTime(), Easing.InOutQuart); - foregroundFill.RotateTo(-90, remainingTime(), Easing.InOutQuart); - } + const float circle_size = logo_size * 0.9f; - const float circle_size = logo_size * 0.9f; + const int rotation_delay = 110; + const int appear_delay = 80; - const int rotation_delay = 110; - const int appear_delay = 80; + purpleCircle.MoveToY(circle_size / 2, remainingTime(), Easing.InOutQuad); + purpleCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); + purpleCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); - purpleCircle.MoveToY(circle_size / 2, remainingTime(), Easing.InOutQuad); - purpleCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); - purpleCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); + using (BeginDelayedSequence(appear_delay, true)) + { + yellowCircle.MoveToY(-circle_size / 2, remainingTime(), Easing.InOutQuad); + yellowCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); + yellowCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); using (BeginDelayedSequence(appear_delay, true)) { - yellowCircle.MoveToY(-circle_size / 2, remainingTime(), Easing.InOutQuad); - yellowCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); - yellowCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); + blueCircle.MoveToX(-circle_size / 2, remainingTime(), Easing.InOutQuad); + blueCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); + blueCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); using (BeginDelayedSequence(appear_delay, true)) { - blueCircle.MoveToX(-circle_size / 2, remainingTime(), Easing.InOutQuad); - blueCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); - blueCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); - - using (BeginDelayedSequence(appear_delay, true)) - { - pinkCircle.MoveToX(circle_size / 2, remainingTime(), Easing.InOutQuad); - pinkCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); - pinkCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); - } + pinkCircle.MoveToX(circle_size / 2, remainingTime(), Easing.InOutQuad); + pinkCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); + pinkCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); } } } From a72e798b8556812e3f2c6b2c42b372891592fa60 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 11:21:50 +0900 Subject: [PATCH 35/52] bar -> line --- osu.Game/Screens/Menu/IntroSequence.cs | 54 +++++++++++++------------- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 54e6d74189..c3a45e74a9 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -20,12 +20,12 @@ namespace osu.Game.Screens.Menu private readonly OsuSpriteText welcomeText; - private readonly Container barsContainer; + private readonly Container linesContainer; - private readonly Container barTopLeft; - private readonly Container barBottomLeft; - private readonly Container barTopRight; - private readonly Container barBottomRight; + private readonly Container lineTopLeft; + private readonly Container lineBottomLeft; + private readonly Container lineTopRight; + private readonly Container lineBottomRight; private readonly Ring smallRing; private readonly Ring mediumRing; @@ -45,14 +45,14 @@ namespace osu.Game.Screens.Menu Children = new Drawable[] { mediumRing = new Ring(Color4.White.Opacity(130)), - barsContainer = new Container + linesContainer = new Container { Anchor = Anchor.Centre, Origin = Anchor.Centre, AutoSizeAxes = Axes.Both, Children = new Drawable[] { - barTopLeft = new Container + lineTopLeft = new Container { Origin = Anchor.CentreLeft, Anchor = Anchor.Centre, @@ -63,7 +63,7 @@ namespace osu.Game.Screens.Menu Colour = Color4.White.Opacity(180), } }, - barTopRight = new Container + lineTopRight = new Container { Origin = Anchor.CentreRight, Anchor = Anchor.Centre, @@ -74,7 +74,7 @@ namespace osu.Game.Screens.Menu Colour = Color4.White.Opacity(80), } }, - barBottomLeft = new Container + lineBottomLeft = new Container { Origin = Anchor.CentreLeft, Anchor = Anchor.Centre, @@ -85,7 +85,7 @@ namespace osu.Game.Screens.Menu Colour = Color4.White.Opacity(230), } }, - barBottomRight = new Container + lineBottomRight = new Container { Origin = Anchor.CentreRight, Anchor = Anchor.Centre, @@ -202,20 +202,20 @@ namespace osu.Game.Screens.Menu welcomeText.FadeIn(700); welcomeText.TransformSpacingTo(new Vector2(20, 0), remainingTime(), Easing.Out); - const int bar_duration = 700; - const int bar_resize = 150; + const int line_duration = 700; + const int line_resize = 150; - foreach (var bar in barsContainer) + foreach (var line in linesContainer) { - bar.FadeIn(); - bar.Delay(bar_resize).ResizeWidthTo(0, bar_duration - bar_resize, Easing.OutQuint); + line.FadeIn(); + line.Delay(line_resize).ResizeWidthTo(0, line_duration - line_resize, Easing.OutQuint); } - const int bar_end_offset = 120; - barTopLeft.MoveTo(new Vector2(-bar_end_offset, -bar_end_offset), bar_duration, Easing.OutQuint); - barTopRight.MoveTo(new Vector2(bar_end_offset, -bar_end_offset), bar_duration, Easing.OutQuint); - barBottomLeft.MoveTo(new Vector2(-bar_end_offset, bar_end_offset), bar_duration, Easing.OutQuint); - barBottomRight.MoveTo(new Vector2(bar_end_offset, bar_end_offset), bar_duration, Easing.OutQuint); + const int line_end_offset = 120; + lineTopLeft.MoveTo(new Vector2(-line_end_offset, -line_end_offset), line_duration, Easing.OutQuint); + lineTopRight.MoveTo(new Vector2(line_end_offset, -line_end_offset), line_duration, Easing.OutQuint); + lineBottomLeft.MoveTo(new Vector2(-line_end_offset, line_end_offset), line_duration, Easing.OutQuint); + lineBottomRight.MoveTo(new Vector2(line_end_offset, line_end_offset), line_duration, Easing.OutQuint); using (BeginDelayedSequence(1640, true)) // 2000 { @@ -278,14 +278,14 @@ namespace osu.Game.Screens.Menu smallRing.Foreground.Size = Vector2.One - new Vector2(0.4f); bigRing.Foreground.Size = Vector2.One - new Vector2(0.15f); - barTopLeft.Size = barTopRight.Size = barBottomLeft.Size = barBottomRight.Size = new Vector2(105, 1.5f); - barTopLeft.Alpha = barTopRight.Alpha = barBottomLeft.Alpha = barBottomRight.Alpha = 0; + lineTopLeft.Size = lineTopRight.Size = lineBottomLeft.Size = lineBottomRight.Size = new Vector2(105, 1.5f); + lineTopLeft.Alpha = lineTopRight.Alpha = lineBottomLeft.Alpha = lineBottomRight.Alpha = 0; - const int bar_offset = 80; - barTopLeft.Position = new Vector2(-bar_offset, -bar_offset); - barTopRight.Position = new Vector2(bar_offset, -bar_offset); - barBottomLeft.Position = new Vector2(-bar_offset, bar_offset); - barBottomRight.Position = new Vector2(bar_offset, bar_offset); + const int line_offset = 80; + lineTopLeft.Position = new Vector2(-line_offset, -line_offset); + lineTopRight.Position = new Vector2(line_offset, -line_offset); + lineBottomLeft.Position = new Vector2(-line_offset, line_offset); + lineBottomRight.Position = new Vector2(line_offset, line_offset); backgroundFill.Rotation = foregroundFill.Rotation = 0; backgroundFill.Alpha = foregroundFill.Alpha = 1; From 7dcdf78608973eea91cabb1a5417f67ea343a702 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 12:06:22 +0900 Subject: [PATCH 36/52] Make bars and circles better --- osu.Game/Screens/Menu/IntroSequence.cs | 86 ++++++++++++++------------ 1 file changed, 47 insertions(+), 39 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index c3a45e74a9..5373270d08 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -187,17 +187,56 @@ namespace osu.Game.Screens.Menu }; } + private void setDefaults() + { + welcomeText.Spacing = new Vector2(5); + welcomeText.Alpha = 0; + + smallRing.Size = mediumRing.Size = bigRing.Size = Vector2.Zero; + + bigRing.Foreground.Size = new Vector2(0.85f); + mediumRing.Foreground.Size = new Vector2(0.7f); + smallRing.Foreground.Size = new Vector2(0.6f); + + foreach (var line in linesContainer) + { + line.Size = new Vector2(105, 1.5f); + line.Alpha = 0; + } + + const int line_offset = 80; + lineTopLeft.Position = new Vector2(-line_offset, -line_offset); + lineTopRight.Position = new Vector2(line_offset, -line_offset); + lineBottomLeft.Position = new Vector2(-line_offset, line_offset); + lineBottomRight.Position = new Vector2(line_offset, line_offset); + + backgroundFill.Rotation = foregroundFill.Rotation = 0; + backgroundFill.Alpha = foregroundFill.Alpha = 1; + backgroundFill.Height = foregroundFill.Width = 0; + + yellowCircle.Size = purpleCircle.Size = blueCircle.Size = pinkCircle.Size = Vector2.Zero; + yellowCircle.Rotation = purpleCircle.Rotation = blueCircle.Rotation = pinkCircle.Rotation = 0; + + const int circle_offset = 250; + yellowCircle.Position = new Vector2(0, -circle_offset); + purpleCircle.Position = new Vector2(0, circle_offset); + blueCircle.Position = new Vector2(-circle_offset, 0); + pinkCircle.Position = new Vector2(circle_offset, 0); + } + public void Start(double length) { FinishTransforms(true); setDefaults(); - mediumRing.ResizeTo(130, 360, Easing.InExpo).OnComplete(r => r.Foreground.ResizeTo(1, 420, Easing.OutQuad)); - smallRing.ResizeTo(logo_size * 0.086f, 250, Easing.InExpo).OnComplete(r => r.Foreground.ResizeTo(1, 650, Easing.OutQuad)); + smallRing.ResizeTo(logo_size * 0.086f, 400, Easing.InOutQuint); + + mediumRing.ResizeTo(130, 340, Easing.OutQuad); + mediumRing.Foreground.ResizeTo(1, 880, Easing.Out); Func remainingTime = () => length - TransformDelay; - using (BeginDelayedSequence(360, true)) + using (BeginDelayedSequence(250, true)) { welcomeText.FadeIn(700); welcomeText.TransformSpacingTo(new Vector2(20, 0), remainingTime(), Easing.Out); @@ -207,11 +246,13 @@ namespace osu.Game.Screens.Menu foreach (var line in linesContainer) { - line.FadeIn(); - line.Delay(line_resize).ResizeWidthTo(0, line_duration - line_resize, Easing.OutQuint); + line.FadeIn(40).ResizeWidthTo(0, line_duration - line_resize, Easing.OutQuint); } const int line_end_offset = 120; + + smallRing.Foreground.ResizeTo(1, line_duration, Easing.OutQuint); + lineTopLeft.MoveTo(new Vector2(-line_end_offset, -line_end_offset), line_duration, Easing.OutQuint); lineTopRight.MoveTo(new Vector2(line_end_offset, -line_end_offset), line_duration, Easing.OutQuint); lineBottomLeft.MoveTo(new Vector2(-line_end_offset, line_end_offset), line_duration, Easing.OutQuint); @@ -267,40 +308,6 @@ namespace osu.Game.Screens.Menu } } - private void setDefaults() - { - welcomeText.Spacing = new Vector2(5); - welcomeText.Alpha = 0; - - smallRing.Size = mediumRing.Size = bigRing.Size = Vector2.Zero; - - mediumRing.Foreground.Size = Vector2.One - new Vector2(0.7f); - smallRing.Foreground.Size = Vector2.One - new Vector2(0.4f); - bigRing.Foreground.Size = Vector2.One - new Vector2(0.15f); - - lineTopLeft.Size = lineTopRight.Size = lineBottomLeft.Size = lineBottomRight.Size = new Vector2(105, 1.5f); - lineTopLeft.Alpha = lineTopRight.Alpha = lineBottomLeft.Alpha = lineBottomRight.Alpha = 0; - - const int line_offset = 80; - lineTopLeft.Position = new Vector2(-line_offset, -line_offset); - lineTopRight.Position = new Vector2(line_offset, -line_offset); - lineBottomLeft.Position = new Vector2(-line_offset, line_offset); - lineBottomRight.Position = new Vector2(line_offset, line_offset); - - backgroundFill.Rotation = foregroundFill.Rotation = 0; - backgroundFill.Alpha = foregroundFill.Alpha = 1; - backgroundFill.Height = foregroundFill.Width = 0; - - yellowCircle.Size = purpleCircle.Size = blueCircle.Size = pinkCircle.Size = Vector2.Zero; - yellowCircle.Rotation = purpleCircle.Rotation = blueCircle.Rotation = pinkCircle.Rotation = 0; - - const int circle_offset = 250; - yellowCircle.Position = new Vector2(0, -circle_offset); - purpleCircle.Position = new Vector2(0, circle_offset); - blueCircle.Position = new Vector2(-circle_offset, 0); - pinkCircle.Position = new Vector2(circle_offset, 0); - } - private class Ring : Container { public readonly CircularContainer Foreground; @@ -317,6 +324,7 @@ namespace osu.Game.Screens.Menu Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, Masking = true, + Scale = new Vector2(0.98f), Child = new Box { RelativeSizeAxes = Axes.Both, From 89426e1c11c7c04c11327f3840482af038542840 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 12:07:52 +0900 Subject: [PATCH 37/52] Simplify lines --- osu.Game/Screens/Menu/IntroSequence.cs | 50 +++++++++----------------- 1 file changed, 17 insertions(+), 33 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 5373270d08..c238f77168 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -20,12 +20,12 @@ namespace osu.Game.Screens.Menu private readonly OsuSpriteText welcomeText; - private readonly Container linesContainer; + private readonly Container lines; - private readonly Container lineTopLeft; - private readonly Container lineBottomLeft; - private readonly Container lineTopRight; - private readonly Container lineBottomRight; + private readonly Box lineTopLeft; + private readonly Box lineBottomLeft; + private readonly Box lineTopRight; + private readonly Box lineBottomRight; private readonly Ring smallRing; private readonly Ring mediumRing; @@ -45,56 +45,40 @@ namespace osu.Game.Screens.Menu Children = new Drawable[] { mediumRing = new Ring(Color4.White.Opacity(130)), - linesContainer = new Container + lines = new Container { Anchor = Anchor.Centre, Origin = Anchor.Centre, AutoSizeAxes = Axes.Both, - Children = new Drawable[] + Children = new [] { - lineTopLeft = new Container + lineTopLeft = new Box { Origin = Anchor.CentreLeft, Anchor = Anchor.Centre, Rotation = 45, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(180), - } + Colour = Color4.White.Opacity(180), }, - lineTopRight = new Container + lineTopRight = new Box { Origin = Anchor.CentreRight, Anchor = Anchor.Centre, Rotation = -45, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(80), - } + Colour = Color4.White.Opacity(80), }, - lineBottomLeft = new Container + lineBottomLeft = new Box { Origin = Anchor.CentreLeft, Anchor = Anchor.Centre, Rotation = -45, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(230), - } + Colour = Color4.White.Opacity(230), }, - lineBottomRight = new Container + lineBottomRight = new Box { Origin = Anchor.CentreRight, Anchor = Anchor.Centre, Rotation = 45, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White.Opacity(130), - } + Colour = Color4.White.Opacity(130), }, } }, @@ -198,7 +182,7 @@ namespace osu.Game.Screens.Menu mediumRing.Foreground.Size = new Vector2(0.7f); smallRing.Foreground.Size = new Vector2(0.6f); - foreach (var line in linesContainer) + foreach (var line in lines) { line.Size = new Vector2(105, 1.5f); line.Alpha = 0; @@ -244,7 +228,7 @@ namespace osu.Game.Screens.Menu const int line_duration = 700; const int line_resize = 150; - foreach (var line in linesContainer) + foreach (var line in lines) { line.FadeIn(40).ResizeWidthTo(0, line_duration - line_resize, Easing.OutQuint); } From f83c095269449e81464070d6480bd8e55f0b4f2a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 12:10:32 +0900 Subject: [PATCH 38/52] Simplify more --- osu.Game/Screens/Menu/IntroSequence.cs | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index c238f77168..70d4bb4016 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -31,8 +31,8 @@ namespace osu.Game.Screens.Menu private readonly Ring mediumRing; private readonly Ring bigRing; - private readonly Container backgroundFill; - private readonly Container foregroundFill; + private readonly Box backgroundFill; + private readonly Box foregroundFill; private readonly CircularContainer pinkCircle; private readonly CircularContainer blueCircle; @@ -44,7 +44,6 @@ namespace osu.Game.Screens.Menu RelativeSizeAxes = Axes.Both; Children = new Drawable[] { - mediumRing = new Ring(Color4.White.Opacity(130)), lines = new Container { Anchor = Anchor.Centre, @@ -82,8 +81,9 @@ namespace osu.Game.Screens.Menu }, } }, - smallRing = new Ring(Color4.White), bigRing = new Ring(OsuColour.FromHex(@"B6C5E9")), + mediumRing = new Ring(Color4.White.Opacity(130)), + smallRing = new Ring(Color4.White), new CircularContainer { Anchor = Anchor.Centre, @@ -92,16 +92,12 @@ namespace osu.Game.Screens.Menu Masking = true, Children = new Drawable[] { - backgroundFill = new Container + backgroundFill = new Box { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = OsuColour.FromHex(@"C6D8FF").Opacity(160), - } + Colour = OsuColour.FromHex(@"C6D8FF").Opacity(160), }, welcomeText = new OsuSpriteText { @@ -111,16 +107,12 @@ namespace osu.Game.Screens.Menu Font = @"Exo2.0-Light", TextSize = 42, }, - foregroundFill = new Container + foregroundFill = new Box { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.White, - } + Colour = Color4.White, }, } }, From 419f041291fb42d8cb49104d54abdc952cda360a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 12:12:27 +0900 Subject: [PATCH 39/52] Fix text alignment --- osu.Game/Screens/Menu/IntroSequence.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 70d4bb4016..a207af629a 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -104,6 +104,7 @@ namespace osu.Game.Screens.Menu Anchor = Anchor.Centre, Origin = Anchor.Centre, Text = "welcome", + Padding = new MarginPadding { Bottom = 10 }, Font = @"Exo2.0-Light", TextSize = 42, }, From 1771e003f7908340f5358084d597ab0ed0993cd0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 12:13:30 +0900 Subject: [PATCH 40/52] Simplify more --- osu.Game/Screens/Menu/IntroSequence.cs | 32 +++++++------------------- 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index a207af629a..9ac075df92 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -117,49 +117,33 @@ namespace osu.Game.Screens.Menu }, } }, - purpleCircle = new CircularContainer + purpleCircle = new Circle { Anchor = Anchor.Centre, Origin = Anchor.TopCentre, Masking = true, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = OsuColour.FromHex(@"AA92FF"), - } + Colour = OsuColour.FromHex(@"AA92FF"), }, - yellowCircle = new CircularContainer + yellowCircle = new Circle { Anchor = Anchor.Centre, Origin = Anchor.BottomCentre, Masking = true, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = OsuColour.FromHex(@"FFD64C"), - } + Colour = OsuColour.FromHex(@"FFD64C"), }, - blueCircle = new CircularContainer + blueCircle = new Circle { Anchor = Anchor.Centre, Origin = Anchor.CentreRight, Masking = true, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = OsuColour.FromHex(@"8FE5FE"), - } + Colour = OsuColour.FromHex(@"8FE5FE"), }, - pinkCircle = new CircularContainer + pinkCircle = new Circle { Anchor = Anchor.Centre, Origin = Anchor.CentreLeft, Masking = true, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = OsuColour.FromHex(@"e967a1"), - } + Colour = OsuColour.FromHex(@"e967a1"), }, }; } From 713d730d1093b005e54a233231c660d9d2d7692c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 13:21:26 +0900 Subject: [PATCH 41/52] Simplify restart process and defaults initialisation --- osu.Game/Screens/Menu/IntroSequence.cs | 170 +++++++++++-------------- 1 file changed, 76 insertions(+), 94 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 9ac075df92..0c68410c92 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -2,8 +2,10 @@ // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE using System; +using System.Linq; using OpenTK; using OpenTK.Graphics; +using osu.Framework.Allocation; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -15,33 +17,40 @@ namespace osu.Game.Screens.Menu { public class IntroSequence : Container { - //Size private const float logo_size = 460; //todo: this should probably be 480 - private readonly OsuSpriteText welcomeText; + private OsuSpriteText welcomeText; - private readonly Container lines; + private Container lines; - private readonly Box lineTopLeft; - private readonly Box lineBottomLeft; - private readonly Box lineTopRight; - private readonly Box lineBottomRight; + private Box lineTopLeft; + private Box lineBottomLeft; + private Box lineTopRight; + private Box lineBottomRight; - private readonly Ring smallRing; - private readonly Ring mediumRing; - private readonly Ring bigRing; + private Ring smallRing; + private Ring mediumRing; + private Ring bigRing; - private readonly Box backgroundFill; - private readonly Box foregroundFill; + private Box backgroundFill; + private Box foregroundFill; - private readonly CircularContainer pinkCircle; - private readonly CircularContainer blueCircle; - private readonly CircularContainer yellowCircle; - private readonly CircularContainer purpleCircle; + private CircularContainer pinkCircle; + private CircularContainer blueCircle; + private CircularContainer yellowCircle; + private CircularContainer purpleCircle; public IntroSequence() { RelativeSizeAxes = Axes.Both; + } + + [BackgroundDependencyLoader] + private void load() + { + const int line_offset = 80; + const int circle_offset = 250; + Children = new Drawable[] { lines = new Container @@ -55,6 +64,7 @@ namespace osu.Game.Screens.Menu { Origin = Anchor.CentreLeft, Anchor = Anchor.Centre, + Position = new Vector2(-line_offset, -line_offset), Rotation = 45, Colour = Color4.White.Opacity(180), }, @@ -62,6 +72,7 @@ namespace osu.Game.Screens.Menu { Origin = Anchor.CentreRight, Anchor = Anchor.Centre, + Position = new Vector2(line_offset, -line_offset), Rotation = -45, Colour = Color4.White.Opacity(80), }, @@ -69,6 +80,7 @@ namespace osu.Game.Screens.Menu { Origin = Anchor.CentreLeft, Anchor = Anchor.Centre, + Position = new Vector2(-line_offset, line_offset), Rotation = -45, Colour = Color4.White.Opacity(230), }, @@ -76,14 +88,26 @@ namespace osu.Game.Screens.Menu { Origin = Anchor.CentreRight, Anchor = Anchor.Centre, + Position = new Vector2(line_offset, line_offset), Rotation = 45, Colour = Color4.White.Opacity(130), }, } }, - bigRing = new Ring(OsuColour.FromHex(@"B6C5E9")), - mediumRing = new Ring(Color4.White.Opacity(130)), - smallRing = new Ring(Color4.White), + bigRing = new Ring(OsuColour.FromHex(@"B6C5E9"), 0.85f), + mediumRing = new Ring(Color4.White.Opacity(130), 0.7f), + smallRing = new Ring(Color4.White, 0.6f), + welcomeText = new OsuSpriteText + { + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + Text = "welcome", + Padding = new MarginPadding { Bottom = 10 }, + Font = @"Exo2.0-Light", + Alpha = 0, + TextSize = 42, + Spacing = new Vector2(5), + }, new CircularContainer { Anchor = Anchor.Centre, @@ -97,98 +121,65 @@ namespace osu.Game.Screens.Menu Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, + Height = 0, Colour = OsuColour.FromHex(@"C6D8FF").Opacity(160), }, - welcomeText = new OsuSpriteText - { - Anchor = Anchor.Centre, - Origin = Anchor.Centre, - Text = "welcome", - Padding = new MarginPadding { Bottom = 10 }, - Font = @"Exo2.0-Light", - TextSize = 42, - }, foregroundFill = new Box { Anchor = Anchor.Centre, Origin = Anchor.Centre, + Size = Vector2.Zero, RelativeSizeAxes = Axes.Both, + Width = 0, Colour = Color4.White, }, } }, - purpleCircle = new Circle - { - Anchor = Anchor.Centre, - Origin = Anchor.TopCentre, - Masking = true, - Colour = OsuColour.FromHex(@"AA92FF"), - }, yellowCircle = new Circle { Anchor = Anchor.Centre, Origin = Anchor.BottomCentre, - Masking = true, + Position = new Vector2(0, -circle_offset), Colour = OsuColour.FromHex(@"FFD64C"), }, - blueCircle = new Circle - { - Anchor = Anchor.Centre, - Origin = Anchor.CentreRight, - Masking = true, - Colour = OsuColour.FromHex(@"8FE5FE"), - }, pinkCircle = new Circle { Anchor = Anchor.Centre, Origin = Anchor.CentreLeft, - Masking = true, + Position = new Vector2(circle_offset, 0), Colour = OsuColour.FromHex(@"e967a1"), }, + purpleCircle = new Circle + { + Anchor = Anchor.Centre, + Origin = Anchor.TopCentre, + Position = new Vector2(0, circle_offset), + Colour = OsuColour.FromHex(@"AA92FF"), + }, + blueCircle = new Circle + { + Anchor = Anchor.Centre, + Origin = Anchor.CentreRight, + Position = new Vector2(-circle_offset, 0), + Colour = OsuColour.FromHex(@"8FE5FE"), + }, }; - } - - private void setDefaults() - { - welcomeText.Spacing = new Vector2(5); - welcomeText.Alpha = 0; - - smallRing.Size = mediumRing.Size = bigRing.Size = Vector2.Zero; - - bigRing.Foreground.Size = new Vector2(0.85f); - mediumRing.Foreground.Size = new Vector2(0.7f); - smallRing.Foreground.Size = new Vector2(0.6f); foreach (var line in lines) { line.Size = new Vector2(105, 1.5f); line.Alpha = 0; } - - const int line_offset = 80; - lineTopLeft.Position = new Vector2(-line_offset, -line_offset); - lineTopRight.Position = new Vector2(line_offset, -line_offset); - lineBottomLeft.Position = new Vector2(-line_offset, line_offset); - lineBottomRight.Position = new Vector2(line_offset, line_offset); - - backgroundFill.Rotation = foregroundFill.Rotation = 0; - backgroundFill.Alpha = foregroundFill.Alpha = 1; - backgroundFill.Height = foregroundFill.Width = 0; - - yellowCircle.Size = purpleCircle.Size = blueCircle.Size = pinkCircle.Size = Vector2.Zero; - yellowCircle.Rotation = purpleCircle.Rotation = blueCircle.Rotation = pinkCircle.Rotation = 0; - - const int circle_offset = 250; - yellowCircle.Position = new Vector2(0, -circle_offset); - purpleCircle.Position = new Vector2(0, circle_offset); - blueCircle.Position = new Vector2(-circle_offset, 0); - pinkCircle.Position = new Vector2(circle_offset, 0); } public void Start(double length) { - FinishTransforms(true); - setDefaults(); + if (Children.Any()) + { + // restart if we were already run previously. + FinishTransforms(true); + load(); + } smallRing.ResizeTo(logo_size * 0.086f, 400, Easing.InOutQuint); @@ -269,40 +260,31 @@ namespace osu.Game.Screens.Menu } } - private class Ring : Container + private class Ring : Container { - public readonly CircularContainer Foreground; + public readonly Circle Foreground; - public Ring(Color4 ringColour) + public Ring(Color4 ringColour, float foregroundSize) { Anchor = Anchor.Centre; Origin = Anchor.Centre; Children = new[] { - new CircularContainer + new Circle { Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, - Masking = true, Scale = new Vector2(0.98f), - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = ringColour, - } + Colour = ringColour, }, - Foreground = new CircularContainer + Foreground = new Circle { + Size = new Vector2(foregroundSize), Anchor = Anchor.Centre, Origin = Anchor.Centre, RelativeSizeAxes = Axes.Both, - Masking = true, - Child = new Box - { - RelativeSizeAxes = Axes.Both, - Colour = Color4.Black, - } + Colour = Color4.Black, } }; } From d8d7165164db8353541839e36889c44cda7b1e8d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 13:52:44 +0900 Subject: [PATCH 42/52] Add a test case which starts the game --- osu.Game.Tests/Visual/TestCaseOsuGame.cs | 39 ++++++++++++++++++++++++ osu.Game.Tests/osu.Game.Tests.csproj | 1 + osu.Game/Screens/Loader.cs | 4 +-- osu.Game/Screens/Menu/MainMenu.cs | 11 ++++--- 4 files changed, 49 insertions(+), 6 deletions(-) create mode 100644 osu.Game.Tests/Visual/TestCaseOsuGame.cs diff --git a/osu.Game.Tests/Visual/TestCaseOsuGame.cs b/osu.Game.Tests/Visual/TestCaseOsuGame.cs new file mode 100644 index 0000000000..3f869e7378 --- /dev/null +++ b/osu.Game.Tests/Visual/TestCaseOsuGame.cs @@ -0,0 +1,39 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using System.Collections.Generic; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Shapes; +using osu.Framework.Timing; +using osu.Game.Screens; +using osu.Game.Screens.Menu; +using OpenTK.Graphics; + +namespace osu.Game.Tests.Visual +{ + public class TestCaseOsuGame : OsuTestCase + { + public override IReadOnlyList RequiredTypes => new[] + { + typeof(OsuLogo), + }; + + public TestCaseOsuGame() + { + var rateAdjustClock = new StopwatchClock(true); + var framedClock = new FramedClock(rateAdjustClock); + framedClock.ProcessFrame(); + + Add(new Box + { + RelativeSizeAxes = Axes.Both, + Colour = Color4.Black, + }); + + Add(new Loader()); + + AddSliderStep("Playback speed", 0.0, 2.0, 1, v => rateAdjustClock.Rate = v); + } + } +} diff --git a/osu.Game.Tests/osu.Game.Tests.csproj b/osu.Game.Tests/osu.Game.Tests.csproj index 4cc06df609..b1081890c8 100644 --- a/osu.Game.Tests/osu.Game.Tests.csproj +++ b/osu.Game.Tests/osu.Game.Tests.csproj @@ -122,6 +122,7 @@ + diff --git a/osu.Game/Screens/Loader.cs b/osu.Game/Screens/Loader.cs index 6de53aeeb0..6680864368 100644 --- a/osu.Game/Screens/Loader.cs +++ b/osu.Game/Screens/Loader.cs @@ -8,7 +8,7 @@ using OpenTK; namespace osu.Game.Screens { - internal class Loader : OsuScreen + public class Loader : OsuScreen { public override bool ShowOverlays => false; @@ -30,7 +30,7 @@ namespace osu.Game.Screens } [BackgroundDependencyLoader] - private void load(OsuGame game) + private void load(OsuGameBase game) { if (game.IsDeployedBuild) LoadComponentAsync(new Disclaimer(), d => Push(d)); diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index 77e45c4575..7729211c4c 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -59,13 +59,16 @@ namespace osu.Game.Screens.Menu }; } - [BackgroundDependencyLoader] - private void load(OsuGame game) + [BackgroundDependencyLoader(true)] + private void load(OsuGame game = null) { LoadComponentAsync(background); - buttons.OnSettings = game.ToggleSettings; - buttons.OnDirect = game.ToggleDirect; + if (game != null) + { + buttons.OnSettings = game.ToggleSettings; + buttons.OnDirect = game.ToggleDirect; + } preloadSongSelect(); } From 41fcecf759a4a0c287d3ea28861963d3b68c8b22 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 14:31:11 +0900 Subject: [PATCH 43/52] Add intro in to actual game --- osu.Game/Screens/Menu/Intro.cs | 12 +++++------- osu.Game/Screens/Menu/IntroSequence.cs | 4 ++-- osu.Game/Screens/Menu/OsuLogo.cs | 4 ++-- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 490b2b3346..311e453a65 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -117,8 +117,8 @@ namespace osu.Game.Screens.Menu logo.RelativePositionAxes = Axes.Both; - logo.Triangles = false; - logo.Colour = Color4.DarkGray; + logo.Triangles = true; + logo.Colour = Color4.White; logo.Ripple = false; const int quick_appear = 350; @@ -129,11 +129,9 @@ namespace osu.Game.Screens.Menu if (!resuming) { - logo.ScaleTo(0.4f); - logo.FadeOut(); - - logo.ScaleTo(1, delay_step_one + delay_step_two, Easing.OutQuint); - logo.FadeIn(delay_step_one + delay_step_two, Easing.OutQuint); + logo.ScaleTo(1); + logo.FadeIn(); + logo.PlayIntro(); } else { diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 0c68410c92..25265eed76 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -210,12 +210,12 @@ namespace osu.Game.Screens.Menu lineBottomLeft.MoveTo(new Vector2(-line_end_offset, line_end_offset), line_duration, Easing.OutQuint); lineBottomRight.MoveTo(new Vector2(line_end_offset, line_end_offset), line_duration, Easing.OutQuint); - using (BeginDelayedSequence(1640, true)) // 2000 + using (BeginDelayedSequence(length * 0.56, true)) { bigRing.ResizeTo(logo_size * 0.86f, 500, Easing.InOutQuint); bigRing.Foreground.Delay(250).ResizeTo(1, 450, Easing.OutExpo); - using (BeginDelayedSequence(250, true)) // 2250 + using (BeginDelayedSequence(250, true)) { backgroundFill.ResizeHeightTo(1, remainingTime(), Easing.InOutQuart); backgroundFill.RotateTo(-90, remainingTime(), Easing.InOutQuart); diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index 6215cb5660..f7c485cf19 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -297,8 +297,8 @@ namespace osu.Game.Screens.Menu public void PlayIntro() { - const double length = 2950; - const double fade = 300; + const double length = 3150; + const double fade = 200; logoHoverContainer.FadeOut().Delay(length).FadeIn(fade); intro.Show(); From fafca093e8ca56bfab9395f7c571dd956443eb83 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 14:43:15 +0900 Subject: [PATCH 44/52] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 3c074a0981..ded020da31 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 3c074a0981844fbaa9f2ecbf879c542f07e2b94d +Subproject commit ded020da31505c124fa0414e85816e6201f235ed From 7ad498cb2921fca0db5eb906d76019a5beaea750 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 14:45:01 +0900 Subject: [PATCH 45/52] Remove unused puzzle pieces --- osu.Game/Screens/Menu/ButtonSystem.cs | 2 -- osu.Game/Screens/Menu/OsuLogo.cs | 24 ------------------------ 2 files changed, 26 deletions(-) diff --git a/osu.Game/Screens/Menu/ButtonSystem.cs b/osu.Game/Screens/Menu/ButtonSystem.cs index 6f9b77e18e..33d118d12e 100644 --- a/osu.Game/Screens/Menu/ButtonSystem.cs +++ b/osu.Game/Screens/Menu/ButtonSystem.cs @@ -326,8 +326,6 @@ namespace osu.Game.Screens.Menu private bool trackingPosition; - public void SetLogoTracking(bool value) => trackingPosition = value; - protected override void Update() { //if (OsuGame.IdleTime > 6000 && State != MenuState.Exit) diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index 297076a78b..5a5b90b3fb 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -224,27 +224,6 @@ namespace osu.Game.Screens.Menu ripple.Texture = textures.Get(@"Menu/logo"); } - private double? reservationEndTime; - private Action reservationCallback; - - private bool canFulfillReservation => !reservationEndTime.HasValue || reservationEndTime <= Time.Current; - - public void RequestUsage(Action callback) - { - reservationCallback = callback; - } - - private void fulfillReservation() - { - reservationCallback(this); - reservationCallback = null; - } - - public void ReserveFor(float duration) - { - reservationEndTime = Time.Current + duration; - } - private int lastBeatIndex; protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes) @@ -311,9 +290,6 @@ namespace osu.Game.Screens.Menu { triangles.Velocity = paused_velocity; } - - if (reservationCallback != null && canFulfillReservation) - fulfillReservation(); } private bool interactive => Action != null && Alpha > 0.2f; From a8bacd1ed48604583bfa94f17bf2e6cd838e2dde Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 14:46:47 +0900 Subject: [PATCH 46/52] Remove unnecessary private method /shrug --- osu.Game/Screens/OsuScreen.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs index 5ecfcd8e8d..a7e1dd0f25 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(() => logoSetup(true)); + logo.DelayUntilTransformsFinished().Schedule(() => LogoSetup(logo, true)); sampleExit?.Play(); } @@ -122,7 +122,7 @@ namespace osu.Game.Screens base.OnEntering(last); - logo.DelayUntilTransformsFinished().Schedule(() => logoSetup(false)); + logo.DelayUntilTransformsFinished().Schedule(() => LogoSetup(logo, false)); } protected override bool OnExiting(Screen next) @@ -148,8 +148,6 @@ namespace osu.Game.Screens return false; } - private void logoSetup(bool resuming) => LogoSetup(logo, resuming); - protected virtual void LogoSetup(OsuLogo logo, bool resuming) { logo.Action = null; From c2d4a213b125b77a8418caa3c1187c42cd8e272e Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 16:34:03 +0900 Subject: [PATCH 47/52] Rename logo-related methods --- osu.Game/Screens/Loader.cs | 4 ++-- osu.Game/Screens/Menu/Intro.cs | 4 ++-- osu.Game/Screens/Menu/MainMenu.cs | 6 +++--- osu.Game/Screens/OsuScreen.cs | 31 +++++++++++++++++---------- osu.Game/Screens/Play/PlayerLoader.cs | 4 ++-- osu.Game/Screens/Select/SongSelect.cs | 8 +++---- 6 files changed, 33 insertions(+), 24 deletions(-) diff --git a/osu.Game/Screens/Loader.cs b/osu.Game/Screens/Loader.cs index 6de53aeeb0..8c70e2421b 100644 --- a/osu.Game/Screens/Loader.cs +++ b/osu.Game/Screens/Loader.cs @@ -17,9 +17,9 @@ namespace osu.Game.Screens ValidForResume = false; } - protected override void LogoSetup(OsuLogo logo, bool resuming) + protected override void OnArrivedLogo(OsuLogo logo, bool resuming) { - base.LogoSetup(logo, resuming); + base.OnArrivedLogo(logo, resuming); logo.RelativePositionAxes = Axes.Both; logo.Triangles = false; diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 9efe7455f7..2cd51f05db 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -109,9 +109,9 @@ namespace osu.Game.Screens.Menu public const int EXIT_DELAY = 3000; - protected override void LogoSetup(OsuLogo logo, bool resuming) + protected override void OnArrivedLogo(OsuLogo logo, bool resuming) { - base.LogoSetup(logo, resuming); + base.OnArrivedLogo(logo, resuming); logo.RelativePositionAxes = Axes.Both; diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index 77e45c4575..6f01199a60 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -103,9 +103,9 @@ namespace osu.Game.Screens.Menu Beatmap.ValueChanged += beatmap_ValueChanged; } - protected override void LogoSetup(OsuLogo logo, bool resuming) + protected override void OnArrivedLogo(OsuLogo logo, bool resuming) { - base.LogoSetup(logo, resuming); + base.OnArrivedLogo(logo, resuming); buttons.SetOsuLogo(logo); @@ -119,7 +119,7 @@ namespace osu.Game.Screens.Menu buttons.State = MenuState.TopLevel; } - protected override void LogoOnSuspending(OsuLogo logo) + protected override void OnSuspendingLogo(OsuLogo logo) { logo.FadeOut(300, Easing.InSine) .ScaleTo(0.2f, 300, Easing.InSine) diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs index a7e1dd0f25..2693ad97fa 100644 --- a/osu.Game/Screens/OsuScreen.cs +++ b/osu.Game/Screens/OsuScreen.cs @@ -76,14 +76,14 @@ namespace osu.Game.Screens protected override void OnResuming(Screen last) { base.OnResuming(last); - logo.DelayUntilTransformsFinished().Schedule(() => LogoSetup(logo, true)); + logo.DelayUntilTransformsFinished().Schedule(() => OnArrivedLogo(logo, true)); sampleExit?.Play(); } protected override void OnSuspending(Screen next) { base.OnSuspending(next); - logoOnSuspending(); + onSuspendingLogo(); } protected override void OnEntering(Screen last) @@ -122,13 +122,13 @@ namespace osu.Game.Screens base.OnEntering(last); - logo.DelayUntilTransformsFinished().Schedule(() => LogoSetup(logo, false)); + logo.DelayUntilTransformsFinished().Schedule(() => OnArrivedLogo(logo, false)); } protected override bool OnExiting(Screen next) { if (ValidForResume && logo != null) - logoOnExiting(); + onExitingLogo(); OsuScreen nextOsu = next as OsuScreen; @@ -148,29 +148,38 @@ namespace osu.Game.Screens return false; } - protected virtual void LogoSetup(OsuLogo logo, bool resuming) + /// + /// Fired when this screen was entered or resumed and the logo state is required to be adjusted. + /// + protected virtual void OnArrivedLogo(OsuLogo logo, bool resuming) { logo.Action = null; logo.FadeOut(300, Easing.OutQuint); } - private void logoOnExiting() + private void onExitingLogo() { logo.ClearTransforms(); - LogoOnExiting(logo); + OnExitingLogo(logo); } - protected virtual void LogoOnExiting(OsuLogo logo) + /// + /// Fired when this screen was exited to add any outwards transition to the logo. + /// + protected virtual void OnExitingLogo(OsuLogo logo) { } - private void logoOnSuspending() + private void onSuspendingLogo() { logo.ClearTransforms(); - LogoOnSuspending(logo); + OnSuspendingLogo(logo); } - protected virtual void LogoOnSuspending(OsuLogo logo) + /// + /// Fired when this screen was suspended to add any outwards transition to the logo. + /// + protected virtual void OnSuspendingLogo(OsuLogo logo) { } } diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index e53026fb8d..6e96fb8b71 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -95,9 +95,9 @@ namespace osu.Game.Screens.Play this.Delay(2150).Schedule(pushWhenLoaded); } - protected override void LogoSetup(OsuLogo logo, bool resuming) + protected override void OnArrivedLogo(OsuLogo logo, bool resuming) { - base.LogoSetup(logo, resuming); + base.OnArrivedLogo(logo, resuming); logo.ClearTransforms(targetMember: nameof(Position)); logo.RelativePositionAxes = Axes.Both; diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index f9e3b0902d..11e7d452fa 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -311,9 +311,9 @@ namespace osu.Game.Screens.Select private const double logo_transition = 250; - protected override void LogoSetup(OsuLogo logo, bool resuming) + protected override void OnArrivedLogo(OsuLogo logo, bool resuming) { - base.LogoSetup(logo, resuming); + base.OnArrivedLogo(logo, resuming); logo.ClearTransforms(); logo.RelativePositionAxes = Axes.Both; @@ -337,9 +337,9 @@ namespace osu.Game.Screens.Select logo.Action = () => carouselRaisedStart(); } - protected override void LogoOnExiting(OsuLogo logo) + protected override void OnExitingLogo(OsuLogo logo) { - base.LogoOnExiting(logo); + base.OnExitingLogo(logo); logo.ScaleTo(0.2f, logo_transition, Easing.OutQuint); logo.FadeOut(logo_transition, Easing.OutQuint); } From df6c808d28dfe7bfa216646e4fac4de6a030c55d Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 17:04:36 +0900 Subject: [PATCH 48/52] Adjust animation to designer-san's liking --- osu.Game/Screens/Menu/IntroSequence.cs | 56 ++++++++++++++------------ 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index 25265eed76..f8886f8dc1 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -135,20 +135,6 @@ namespace osu.Game.Screens.Menu }, } }, - yellowCircle = new Circle - { - Anchor = Anchor.Centre, - Origin = Anchor.BottomCentre, - Position = new Vector2(0, -circle_offset), - Colour = OsuColour.FromHex(@"FFD64C"), - }, - pinkCircle = new Circle - { - Anchor = Anchor.Centre, - Origin = Anchor.CentreLeft, - Position = new Vector2(circle_offset, 0), - Colour = OsuColour.FromHex(@"e967a1"), - }, purpleCircle = new Circle { Anchor = Anchor.Centre, @@ -163,6 +149,20 @@ namespace osu.Game.Screens.Menu Position = new Vector2(-circle_offset, 0), Colour = OsuColour.FromHex(@"8FE5FE"), }, + yellowCircle = new Circle + { + Anchor = Anchor.Centre, + Origin = Anchor.BottomCentre, + Position = new Vector2(0, -circle_offset), + Colour = OsuColour.FromHex(@"FFD64C"), + }, + pinkCircle = new Circle + { + Anchor = Anchor.Centre, + Origin = Anchor.CentreLeft, + Position = new Vector2(circle_offset, 0), + Colour = OsuColour.FromHex(@"e967a1"), + }, }; foreach (var line in lines) @@ -170,6 +170,8 @@ namespace osu.Game.Screens.Menu line.Size = new Vector2(105, 1.5f); line.Alpha = 0; } + + Scale = new Vector2(0.5f); } public void Start(double length) @@ -226,32 +228,34 @@ namespace osu.Game.Screens.Menu foregroundFill.RotateTo(-90, remainingTime(), Easing.InOutQuart); } + this.ScaleTo(1, remainingTime(), Easing.InOutCubic); + const float circle_size = logo_size * 0.9f; const int rotation_delay = 110; const int appear_delay = 80; - purpleCircle.MoveToY(circle_size / 2, remainingTime(), Easing.InOutQuad); - purpleCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); - purpleCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); + purpleCircle.MoveToY(circle_size / 2, remainingTime(), Easing.InOutQuart); + purpleCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.InOutQuart); + purpleCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuart); using (BeginDelayedSequence(appear_delay, true)) { - yellowCircle.MoveToY(-circle_size / 2, remainingTime(), Easing.InOutQuad); - yellowCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); - yellowCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); + yellowCircle.MoveToY(-circle_size / 2, remainingTime(), Easing.InOutQuart); + yellowCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.InOutQuart); + yellowCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuart); using (BeginDelayedSequence(appear_delay, true)) { - blueCircle.MoveToX(-circle_size / 2, remainingTime(), Easing.InOutQuad); - blueCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); - blueCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); + blueCircle.MoveToX(-circle_size / 2, remainingTime(), Easing.InOutQuart); + blueCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.InOutQuart); + blueCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuart); using (BeginDelayedSequence(appear_delay, true)) { - pinkCircle.MoveToX(circle_size / 2, remainingTime(), Easing.InOutQuad); - pinkCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.OutQuad); - pinkCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuad); + pinkCircle.MoveToX(circle_size / 2, remainingTime(), Easing.InOutQuart); + pinkCircle.Delay(rotation_delay).RotateTo(-180, remainingTime() - rotation_delay, Easing.InOutQuart); + pinkCircle.ResizeTo(circle_size, remainingTime(), Easing.InOutQuart); } } } From e2005c44316754c2884e01e2dad2bdcc8d4f2761 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 8 Nov 2017 20:36:18 +0900 Subject: [PATCH 49/52] Add comment explaining necessity of AlwaysPresent for now --- osu.Game/Screens/Menu/OsuLogo.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game/Screens/Menu/OsuLogo.cs b/osu.Game/Screens/Menu/OsuLogo.cs index 5a5b90b3fb..3b79749341 100644 --- a/osu.Game/Screens/Menu/OsuLogo.cs +++ b/osu.Game/Screens/Menu/OsuLogo.cs @@ -77,6 +77,7 @@ namespace osu.Game.Screens.Menu public OsuLogo() { + // Required to make Schedule calls run in OsuScreen even when we are not visible. AlwaysPresent = true; EarlyActivationMilliseconds = early_activation; From 4874371dbffa6e568ddaf9aeda94c07c2e40ccac Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 9 Nov 2017 17:38:20 +0900 Subject: [PATCH 50/52] Rename methods back --- osu.Game/Screens/Loader.cs | 4 ++-- osu.Game/Screens/Menu/Intro.cs | 4 ++-- osu.Game/Screens/Menu/MainMenu.cs | 6 +++--- osu.Game/Screens/OsuScreen.cs | 14 +++++++------- osu.Game/Screens/Play/PlayerLoader.cs | 4 ++-- osu.Game/Screens/Select/SongSelect.cs | 8 ++++---- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/osu.Game/Screens/Loader.cs b/osu.Game/Screens/Loader.cs index 8c70e2421b..8fe6b2c5a2 100644 --- a/osu.Game/Screens/Loader.cs +++ b/osu.Game/Screens/Loader.cs @@ -17,9 +17,9 @@ namespace osu.Game.Screens ValidForResume = false; } - protected override void OnArrivedLogo(OsuLogo logo, bool resuming) + protected override void LogoArriving(OsuLogo logo, bool resuming) { - base.OnArrivedLogo(logo, resuming); + base.LogoArriving(logo, resuming); logo.RelativePositionAxes = Axes.Both; logo.Triangles = false; diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 2cd51f05db..70c2430e10 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -109,9 +109,9 @@ namespace osu.Game.Screens.Menu public const int EXIT_DELAY = 3000; - protected override void OnArrivedLogo(OsuLogo logo, bool resuming) + protected override void LogoArriving(OsuLogo logo, bool resuming) { - base.OnArrivedLogo(logo, resuming); + base.LogoArriving(logo, resuming); logo.RelativePositionAxes = Axes.Both; diff --git a/osu.Game/Screens/Menu/MainMenu.cs b/osu.Game/Screens/Menu/MainMenu.cs index 6f01199a60..8b9dd38a7b 100644 --- a/osu.Game/Screens/Menu/MainMenu.cs +++ b/osu.Game/Screens/Menu/MainMenu.cs @@ -103,9 +103,9 @@ namespace osu.Game.Screens.Menu Beatmap.ValueChanged += beatmap_ValueChanged; } - protected override void OnArrivedLogo(OsuLogo logo, bool resuming) + protected override void LogoArriving(OsuLogo logo, bool resuming) { - base.OnArrivedLogo(logo, resuming); + base.LogoArriving(logo, resuming); buttons.SetOsuLogo(logo); @@ -119,7 +119,7 @@ namespace osu.Game.Screens.Menu buttons.State = MenuState.TopLevel; } - protected override void OnSuspendingLogo(OsuLogo logo) + protected override void LogoSuspending(OsuLogo logo) { logo.FadeOut(300, Easing.InSine) .ScaleTo(0.2f, 300, Easing.InSine) diff --git a/osu.Game/Screens/OsuScreen.cs b/osu.Game/Screens/OsuScreen.cs index 2693ad97fa..3dd175ca88 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(() => OnArrivedLogo(logo, true)); + logo.DelayUntilTransformsFinished().Schedule(() => LogoArriving(logo, true)); sampleExit?.Play(); } @@ -122,7 +122,7 @@ namespace osu.Game.Screens base.OnEntering(last); - logo.DelayUntilTransformsFinished().Schedule(() => OnArrivedLogo(logo, false)); + logo.DelayUntilTransformsFinished().Schedule(() => LogoArriving(logo, false)); } protected override bool OnExiting(Screen next) @@ -151,7 +151,7 @@ namespace osu.Game.Screens /// /// Fired when this screen was entered or resumed and the logo state is required to be adjusted. /// - protected virtual void OnArrivedLogo(OsuLogo logo, bool resuming) + protected virtual void LogoArriving(OsuLogo logo, bool resuming) { logo.Action = null; logo.FadeOut(300, Easing.OutQuint); @@ -160,26 +160,26 @@ namespace osu.Game.Screens private void onExitingLogo() { logo.ClearTransforms(); - OnExitingLogo(logo); + LogoExiting(logo); } /// /// Fired when this screen was exited to add any outwards transition to the logo. /// - protected virtual void OnExitingLogo(OsuLogo logo) + protected virtual void LogoExiting(OsuLogo logo) { } private void onSuspendingLogo() { logo.ClearTransforms(); - OnSuspendingLogo(logo); + LogoSuspending(logo); } /// /// Fired when this screen was suspended to add any outwards transition to the logo. /// - protected virtual void OnSuspendingLogo(OsuLogo logo) + protected virtual void LogoSuspending(OsuLogo logo) { } } diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs index 6e96fb8b71..53a2dcc41f 100644 --- a/osu.Game/Screens/Play/PlayerLoader.cs +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -95,9 +95,9 @@ namespace osu.Game.Screens.Play this.Delay(2150).Schedule(pushWhenLoaded); } - protected override void OnArrivedLogo(OsuLogo logo, bool resuming) + protected override void LogoArriving(OsuLogo logo, bool resuming) { - base.OnArrivedLogo(logo, resuming); + base.LogoArriving(logo, resuming); logo.ClearTransforms(targetMember: nameof(Position)); logo.RelativePositionAxes = Axes.Both; diff --git a/osu.Game/Screens/Select/SongSelect.cs b/osu.Game/Screens/Select/SongSelect.cs index 11e7d452fa..987fef2541 100644 --- a/osu.Game/Screens/Select/SongSelect.cs +++ b/osu.Game/Screens/Select/SongSelect.cs @@ -311,9 +311,9 @@ namespace osu.Game.Screens.Select private const double logo_transition = 250; - protected override void OnArrivedLogo(OsuLogo logo, bool resuming) + protected override void LogoArriving(OsuLogo logo, bool resuming) { - base.OnArrivedLogo(logo, resuming); + base.LogoArriving(logo, resuming); logo.ClearTransforms(); logo.RelativePositionAxes = Axes.Both; @@ -337,9 +337,9 @@ namespace osu.Game.Screens.Select logo.Action = () => carouselRaisedStart(); } - protected override void OnExitingLogo(OsuLogo logo) + protected override void LogoExiting(OsuLogo logo) { - base.OnExitingLogo(logo); + base.LogoExiting(logo); logo.ScaleTo(0.2f, logo_transition, Easing.OutQuint); logo.FadeOut(logo_transition, Easing.OutQuint); } From 6d56b3c2df8f59f21298580ea5f10ba9c56f0e53 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 9 Nov 2017 17:52:38 +0900 Subject: [PATCH 51/52] Hide triangles during outro --- osu.Game/Screens/Menu/Intro.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Menu/Intro.cs b/osu.Game/Screens/Menu/Intro.cs index 85dc13747f..0445733b23 100644 --- a/osu.Game/Screens/Menu/Intro.cs +++ b/osu.Game/Screens/Menu/Intro.cs @@ -116,8 +116,6 @@ namespace osu.Game.Screens.Menu base.LogoArriving(logo, resuming); logo.RelativePositionAxes = Axes.Both; - - logo.Triangles = true; logo.Colour = Color4.White; logo.Ripple = false; @@ -129,12 +127,16 @@ namespace osu.Game.Screens.Menu if (!resuming) { + logo.Triangles = true; + logo.ScaleTo(1); logo.FadeIn(); logo.PlayIntro(); } else { + logo.Triangles = false; + logo .ScaleTo(1, initialMovementTime, Easing.OutQuint) .FadeIn(quick_appear, Easing.OutQuint) From 598e1652dcdfebfa6fb9e9df0cc6ba464a649960 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 9 Nov 2017 18:12:33 +0900 Subject: [PATCH 52/52] Adjust timings --- osu.Game/Screens/Menu/IntroSequence.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game/Screens/Menu/IntroSequence.cs b/osu.Game/Screens/Menu/IntroSequence.cs index f8886f8dc1..5fca389708 100644 --- a/osu.Game/Screens/Menu/IntroSequence.cs +++ b/osu.Game/Screens/Menu/IntroSequence.cs @@ -214,8 +214,8 @@ namespace osu.Game.Screens.Menu using (BeginDelayedSequence(length * 0.56, true)) { - bigRing.ResizeTo(logo_size * 0.86f, 500, Easing.InOutQuint); - bigRing.Foreground.Delay(250).ResizeTo(1, 450, Easing.OutExpo); + bigRing.ResizeTo(logo_size, 500, Easing.InOutQuint); + bigRing.Foreground.Delay(250).ResizeTo(1, 850, Easing.OutQuint); using (BeginDelayedSequence(250, true)) {