mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 15:12:57 +08:00
Fix ResumeContainers appearing when resuming during breaks.
This commit is contained in:
parent
f2f60f6d03
commit
e76897d6a7
@ -23,6 +23,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private readonly Container fadeContainer;
|
private readonly Container fadeContainer;
|
||||||
|
|
||||||
|
public bool IsActive { get; private set; }
|
||||||
|
|
||||||
public List<BreakPeriod> Breaks
|
public List<BreakPeriod> Breaks
|
||||||
{
|
{
|
||||||
get => breaks;
|
get => breaks;
|
||||||
@ -125,6 +127,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
using (BeginAbsoluteSequence(b.StartTime, true))
|
using (BeginAbsoluteSequence(b.StartTime, true))
|
||||||
{
|
{
|
||||||
|
Schedule(() => IsActive = true);
|
||||||
fadeContainer.FadeIn(fade_duration);
|
fadeContainer.FadeIn(fade_duration);
|
||||||
breakArrows.Show(fade_duration);
|
breakArrows.Show(fade_duration);
|
||||||
|
|
||||||
@ -142,6 +145,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
using (BeginDelayedSequence(b.Duration - fade_duration, true))
|
using (BeginDelayedSequence(b.Duration - fade_duration, true))
|
||||||
{
|
{
|
||||||
|
Schedule(() => IsActive = false);
|
||||||
fadeContainer.FadeOut(fade_duration);
|
fadeContainer.FadeOut(fade_duration);
|
||||||
breakArrows.Hide(fade_duration);
|
breakArrows.Hide(fade_duration);
|
||||||
}
|
}
|
||||||
|
@ -60,6 +60,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private SampleChannel sampleRestart;
|
private SampleChannel sampleRestart;
|
||||||
|
|
||||||
|
private BreakOverlay breakOverlay;
|
||||||
|
|
||||||
protected ScoreProcessor ScoreProcessor { get; private set; }
|
protected ScoreProcessor ScoreProcessor { get; private set; }
|
||||||
protected DrawableRuleset DrawableRuleset { get; private set; }
|
protected DrawableRuleset DrawableRuleset { get; private set; }
|
||||||
|
|
||||||
@ -115,7 +117,7 @@ namespace osu.Game.Screens.Play
|
|||||||
Child = DrawableRuleset
|
Child = DrawableRuleset
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
new BreakOverlay(working.Beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor)
|
breakOverlay = new BreakOverlay(working.Beatmap.BeatmapInfo.LetterboxInBreaks, ScoreProcessor)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
@ -405,8 +407,8 @@ namespace osu.Game.Screens.Play
|
|||||||
IsResuming = true;
|
IsResuming = true;
|
||||||
PauseOverlay.Hide();
|
PauseOverlay.Hide();
|
||||||
|
|
||||||
// time-based conditions may allow instant resume.
|
// breaks and time-based conditions may allow instant resume.
|
||||||
if (GameplayClockContainer.GameplayClock.CurrentTime < Beatmap.Value.Beatmap.HitObjects.First().StartTime)
|
if (breakOverlay.IsActive || GameplayClockContainer.GameplayClock.CurrentTime < Beatmap.Value.Beatmap.HitObjects.First().StartTime)
|
||||||
completeResume();
|
completeResume();
|
||||||
else
|
else
|
||||||
DrawableRuleset.RequestResume(completeResume);
|
DrawableRuleset.RequestResume(completeResume);
|
||||||
|
Loading…
Reference in New Issue
Block a user