mirror of
https://github.com/ppy/osu
synced 2025-01-05 21:59:46 +00:00
Fix SkipOverlay
's FadeContent
not getting correct state from parent
This commit is contained in:
parent
3cc9bad979
commit
9ec3255c50
@ -8,19 +8,19 @@ using osu.Framework.Audio;
|
||||
using osu.Framework.Audio.Sample;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.Screens.Ranking;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Framework.Input.Bindings;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Input.Bindings;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
@ -92,6 +92,18 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private double fadeOutBeginTime => startTime - MasterGameplayClockContainer.MINIMUM_SKIP_TIME;
|
||||
|
||||
public override void Hide()
|
||||
{
|
||||
base.Hide();
|
||||
fadeContainer.Hide();
|
||||
}
|
||||
|
||||
public override void Show()
|
||||
{
|
||||
base.Show();
|
||||
fadeContainer.Show();
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
@ -147,7 +159,7 @@ namespace osu.Game.Screens.Play
|
||||
{
|
||||
}
|
||||
|
||||
private class FadeContainer : Container, IStateful<Visibility>
|
||||
public class FadeContainer : Container, IStateful<Visibility>
|
||||
{
|
||||
public event Action<Visibility> StateChanged;
|
||||
|
||||
@ -170,7 +182,7 @@ namespace osu.Game.Screens.Play
|
||||
switch (state)
|
||||
{
|
||||
case Visibility.Visible:
|
||||
// we may be triggered to become visible mnultiple times but we only want to transform once.
|
||||
// we may be triggered to become visible multiple times but we only want to transform once.
|
||||
if (stateChanged)
|
||||
this.FadeIn(500, Easing.OutExpo);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user