mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 20:22:55 +08:00
Fix wave-based overlays always being present before initial display
This commit is contained in:
parent
115dcc3147
commit
2645967dc4
@ -15,7 +15,7 @@ using osu.Game.Overlays;
|
||||
|
||||
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 samplePopOut;
|
||||
|
@ -95,6 +95,7 @@ namespace osu.Game.Graphics.Containers
|
||||
AddInternal(contentContainer = new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
RelativePositionAxes = Axes.Both,
|
||||
Anchor = Anchor.BottomCentre,
|
||||
Origin = Anchor.BottomCentre,
|
||||
});
|
||||
@ -105,21 +106,15 @@ namespace osu.Game.Graphics.Containers
|
||||
foreach (var w in wavesContainer.Children)
|
||||
w.Show();
|
||||
|
||||
this.FadeIn(100, Easing.OutQuint);
|
||||
contentContainer.MoveToY(0, APPEAR_DURATION, Easing.OutQuint);
|
||||
|
||||
this.FadeIn(100, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override void PopOut()
|
||||
{
|
||||
this.FadeOut(DISAPPEAR_DURATION, Easing.InQuint);
|
||||
contentContainer.MoveToY(DrawHeight * 2f, DISAPPEAR_DURATION, Easing.In);
|
||||
|
||||
foreach (var w in wavesContainer.Children)
|
||||
w.Hide();
|
||||
|
||||
this.FadeOut(DISAPPEAR_DURATION, Easing.InQuint);
|
||||
contentContainer.MoveToY(2, DISAPPEAR_DURATION, Easing.In);
|
||||
}
|
||||
|
||||
protected override void UpdateAfterChildren()
|
||||
|
@ -25,13 +25,17 @@ namespace osu.Game.Overlays
|
||||
protected override void PopIn()
|
||||
{
|
||||
base.PopIn();
|
||||
|
||||
Waves.Show();
|
||||
this.FadeIn(100, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override void PopOut()
|
||||
{
|
||||
base.PopOut();
|
||||
|
||||
Waves.Hide();
|
||||
this.FadeOut(WaveContainer.DISAPPEAR_DURATION, Easing.InQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user