1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-26 11:03:22 +08:00
osu-lazer/osu.Game/Overlays/WaveOverlayContainer.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

50 lines
1.3 KiB
C#
Raw Normal View History

// 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.
2018-04-13 17:19:50 +08:00
2022-06-17 15:37:17 +08:00
#nullable disable
2017-02-23 10:16:23 +08:00
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics;
using osu.Game.Graphics.Containers;
2018-04-13 17:19:50 +08:00
2017-02-23 10:16:23 +08:00
namespace osu.Game.Overlays
{
public abstract class WaveOverlayContainer : OsuFocusedOverlayContainer
2017-02-23 10:16:23 +08:00
{
protected readonly WaveContainer Waves;
2018-04-13 17:19:50 +08:00
protected override bool BlockNonPositionalInput => true;
protected override Container<Drawable> Content => Waves;
2018-04-13 17:19:50 +08:00
2020-09-03 15:28:14 +08:00
public const float WIDTH_PADDING = 80;
protected override bool StartHidden => true;
protected override string PopInSampleName => "UI/wave-pop-in";
2017-02-23 11:48:24 +08:00
protected WaveOverlayContainer()
2017-02-23 10:16:23 +08:00
{
AddInternal(Waves = new WaveContainer
2017-02-23 10:16:23 +08:00
{
RelativeSizeAxes = Axes.Both,
});
2017-02-23 10:22:01 +08:00
}
2018-04-13 17:19:50 +08:00
2017-02-23 11:42:31 +08:00
protected override void PopIn()
{
2017-03-04 06:05:43 +08:00
base.PopIn();
Waves.Show();
this.FadeIn(100, Easing.OutQuint);
2017-02-23 11:42:31 +08:00
}
2018-04-13 17:19:50 +08:00
2017-02-23 11:42:31 +08:00
protected override void PopOut()
{
2017-03-04 06:05:43 +08:00
base.PopOut();
Waves.Hide();
this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InQuint);
2017-02-23 10:16:23 +08:00
}
}
}