1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 22:22:55 +08:00
osu-lazer/osu.Game/Screens/OnlinePlay/OnlinePlaySubScreen.cs
Dean Herbert 4afc808ffc Remove horizontal transitions for now
They look bad with the current toolbar implementation. We can probably
add them back once the toolbar is moved to the lounge.
2021-08-19 18:29:59 +09:00

55 lines
1.5 KiB
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Screens;
namespace osu.Game.Screens.OnlinePlay
{
public abstract class OnlinePlaySubScreen : OsuScreen, IOnlinePlaySubScreen
{
public override bool DisallowExternalBeatmapRulesetChanges => false;
public virtual string ShortTitle => Title;
[Resolved(CanBeNull = true)]
protected IRoomManager RoomManager { get; private set; }
protected OnlinePlaySubScreen()
{
Anchor = Anchor.Centre;
Origin = Anchor.Centre;
RelativeSizeAxes = Axes.Both;
}
public const double APPEAR_DURATION = 800;
public const double DISAPPEAR_DURATION = 500;
public override void OnEntering(IScreen last)
{
this.FadeInFromZero(APPEAR_DURATION, Easing.OutQuint);
}
public override bool OnExiting(IScreen next)
{
this.FadeOut(DISAPPEAR_DURATION, Easing.OutQuint);
return false;
}
public override void OnResuming(IScreen last)
{
this.FadeIn(APPEAR_DURATION, Easing.OutQuint);
}
public override void OnSuspending(IScreen next)
{
this.FadeOut(DISAPPEAR_DURATION, Easing.OutQuint);
}
public override string ToString() => Title;
}
}