mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
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.
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user