1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 18:03:11 +08:00

Fix wave-based overlays always being present before initial display

This commit is contained in:
Dean Herbert 2019-07-02 15:17:35 +09:00
parent 115dcc3147
commit 2645967dc4
3 changed files with 7 additions and 8 deletions

View File

@ -15,7 +15,7 @@ using osu.Game.Overlays;
namespace osu.Game.Graphics.Containers namespace osu.Game.Graphics.Containers
{ {
public class OsuFocusedOverlayContainer : FocusedOverlayContainer, IPreviewTrackOwner, IKeyBindingHandler<GlobalAction> public abstract class OsuFocusedOverlayContainer : FocusedOverlayContainer, IPreviewTrackOwner, IKeyBindingHandler<GlobalAction>
{ {
private SampleChannel samplePopIn; private SampleChannel samplePopIn;
private SampleChannel samplePopOut; private SampleChannel samplePopOut;

View File

@ -95,6 +95,7 @@ namespace osu.Game.Graphics.Containers
AddInternal(contentContainer = new Container AddInternal(contentContainer = new Container
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
RelativePositionAxes = Axes.Both,
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
}); });
@ -105,21 +106,15 @@ namespace osu.Game.Graphics.Containers
foreach (var w in wavesContainer.Children) foreach (var w in wavesContainer.Children)
w.Show(); w.Show();
this.FadeIn(100, Easing.OutQuint);
contentContainer.MoveToY(0, APPEAR_DURATION, Easing.OutQuint); contentContainer.MoveToY(0, APPEAR_DURATION, Easing.OutQuint);
this.FadeIn(100, Easing.OutQuint);
} }
protected override void PopOut() protected override void PopOut()
{ {
this.FadeOut(DISAPPEAR_DURATION, Easing.InQuint);
contentContainer.MoveToY(DrawHeight * 2f, DISAPPEAR_DURATION, Easing.In);
foreach (var w in wavesContainer.Children) foreach (var w in wavesContainer.Children)
w.Hide(); w.Hide();
this.FadeOut(DISAPPEAR_DURATION, Easing.InQuint); contentContainer.MoveToY(2, DISAPPEAR_DURATION, Easing.In);
} }
protected override void UpdateAfterChildren() protected override void UpdateAfterChildren()

View File

@ -25,13 +25,17 @@ namespace osu.Game.Overlays
protected override void PopIn() protected override void PopIn()
{ {
base.PopIn(); base.PopIn();
Waves.Show(); Waves.Show();
this.FadeIn(100, Easing.OutQuint);
} }
protected override void PopOut() protected override void PopOut()
{ {
base.PopOut(); base.PopOut();
Waves.Hide(); Waves.Hide();
this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InQuint);
} }
} }
} }