2019-01-24 08:43:03 +00:00
|
|
|
|
// 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
|
|
|
|
|
2017-02-23 02:16:23 +00:00
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2017-02-18 11:28:22 +00:00
|
|
|
|
using osu.Framework.Graphics;
|
2017-06-28 17:18:12 +00:00
|
|
|
|
using osu.Game.Graphics.Containers;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-02-23 02:16:23 +00:00
|
|
|
|
namespace osu.Game.Overlays
|
|
|
|
|
{
|
2017-06-28 17:18:12 +00:00
|
|
|
|
public abstract partial class WaveOverlayContainer : OsuFocusedOverlayContainer
|
2017-02-23 02:16:23 +00:00
|
|
|
|
{
|
2018-04-15 07:44:40 +00:00
|
|
|
|
protected readonly WaveContainer Waves;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2018-09-26 05:01:15 +00:00
|
|
|
|
protected override bool BlockNonPositionalInput => true;
|
2018-04-15 07:44:40 +00:00
|
|
|
|
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;
|
|
|
|
|
|
2019-07-02 06:21:57 +00:00
|
|
|
|
protected override bool StartHidden => true;
|
|
|
|
|
|
2021-01-15 05:57:46 +00:00
|
|
|
|
protected override string PopInSampleName => "UI/wave-pop-in";
|
|
|
|
|
|
2023-04-03 00:11:19 +00:00
|
|
|
|
public const float HORIZONTAL_PADDING = 50;
|
|
|
|
|
|
2017-02-23 03:48:24 +00:00
|
|
|
|
protected WaveOverlayContainer()
|
2017-02-23 02:16:23 +00:00
|
|
|
|
{
|
2018-04-15 07:44:40 +00:00
|
|
|
|
AddInternal(Waves = new WaveContainer
|
2017-02-23 02:16:23 +00:00
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
});
|
2017-02-23 02:22:01 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-02-23 03:42:31 +00:00
|
|
|
|
protected override void PopIn()
|
|
|
|
|
{
|
2018-04-15 07:44:40 +00:00
|
|
|
|
Waves.Show();
|
2019-07-02 06:17:35 +00:00
|
|
|
|
this.FadeIn(100, Easing.OutQuint);
|
2017-02-23 03:42:31 +00:00
|
|
|
|
}
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2017-02-23 03:42:31 +00:00
|
|
|
|
protected override void PopOut()
|
|
|
|
|
{
|
2017-03-03 22:05:43 +00:00
|
|
|
|
base.PopOut();
|
2019-07-02 06:17:35 +00:00
|
|
|
|
|
2018-04-15 07:44:40 +00:00
|
|
|
|
Waves.Hide();
|
2019-07-02 06:17:35 +00:00
|
|
|
|
this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InQuint);
|
2017-02-23 02:16:23 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|