osu/osu.Game/Overlays/WaveOverlayContainer.cs

46 lines
1.2 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 09:19:50 +00:00
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics;
using osu.Game.Graphics.Containers;
namespace osu.Game.Overlays
{
public abstract class WaveOverlayContainer : OsuFocusedOverlayContainer
{
protected readonly WaveContainer Waves;
2018-04-13 09:19:50 +00:00
protected override bool BlockNonPositionalInput => true;
protected override Container<Drawable> Content => Waves;
2018-04-13 09:19:50 +00:00
2020-09-03 07:28:14 +00:00
public const float WIDTH_PADDING = 80;
protected override bool StartHidden => true;
2018-04-13 09:19:50 +00:00
protected WaveOverlayContainer()
{
AddInternal(Waves = new WaveContainer
2018-04-13 09:19:50 +00:00
{
RelativeSizeAxes = Axes.Both,
});
}
protected override void PopIn()
{
base.PopIn();
Waves.Show();
this.FadeIn(100, Easing.OutQuint);
2018-04-13 09:19:50 +00:00
}
protected override void PopOut()
{
base.PopOut();
Waves.Hide();
this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InQuint);
2018-04-13 09:19:50 +00:00
}
}
}