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