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:
parent
fdcb5e924c
commit
97bacbdc76
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user