1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-13 08:32:57 +08:00

Show score after the end of the storyboard after it was toggled

This commit is contained in:
Christine Chen 2021-04-17 17:55:46 -04:00
parent fdcb5e924c
commit 97bacbdc76
2 changed files with 6 additions and 7 deletions

View File

@ -50,6 +50,7 @@ namespace osu.Game.Screens.Play
return;
drawableStoryboard = storyboard.CreateDrawable();
HasStoryboardEnded.BindTo(drawableStoryboard.HasStoryboardEnded);
if (async)
LoadComponentAsync(drawableStoryboard, onStoryboardCreated);
@ -63,6 +64,6 @@ namespace osu.Game.Screens.Play
OverlayLayerContainer.Add(storyboard.OverlayLayer.CreateProxy());
}
public IBindable<bool> HasStoryboardEnded => drawableStoryboard?.HasStoryboardEnded;
public IBindable<bool> HasStoryboardEnded = new BindableBool(true);
}
}

View File

@ -95,15 +95,13 @@ namespace osu.Game.Storyboards.Drawables
/// </summary>
public IBindable<bool> HasStoryboardEnded => hasStoryboardEnded;
private readonly BindableBool hasStoryboardEnded = new BindableBool(true);
private readonly BindableBool hasStoryboardEnded = new BindableBool();
private void updateHasStoryboardEnded()
{
if (Storyboard.LatestEventTime == null)
return;
var time = Clock.CurrentTime;
hasStoryboardEnded.Value = time >= Storyboard.LatestEventTime;
hasStoryboardEnded.Value =
Storyboard.LatestEventTime == null ||
Time.Current >= Storyboard.LatestEventTime;
}
}
}