mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 04:02:57 +08:00
Add proper resume request logic
This commit is contained in:
parent
8ad4009c33
commit
a694626cc6
@ -169,7 +169,20 @@ namespace osu.Game.Rulesets.UI
|
|||||||
mod.ApplyToDrawableHitObjects(Playfield.HitObjectContainer.Objects);
|
mod.ApplyToDrawableHitObjects(Playfield.HitObjectContainer.Objects);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void RequestResume(Action continueResume) => continueResume();
|
public override void RequestResume(Action continueResume)
|
||||||
|
{
|
||||||
|
if (ResumeOverlay != null && (Cursor == null || Contains(Cursor.ActiveCursor.ScreenSpaceDrawQuad.Centre)))
|
||||||
|
{
|
||||||
|
ResumeOverlay.ResumeAction = continueResume;
|
||||||
|
ResumeOverlay.Show();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
continueResume();
|
||||||
|
}
|
||||||
|
|
||||||
|
public ResumeOverlay ResumeOverlay { get; private set; }
|
||||||
|
|
||||||
|
protected virtual ResumeOverlay CreateResumeOverlay() => null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Creates and adds the visual representation of a <see cref="TObject"/> to this <see cref="DrawableRuleset{TObject}"/>.
|
/// Creates and adds the visual representation of a <see cref="TObject"/> to this <see cref="DrawableRuleset{TObject}"/>.
|
||||||
|
Loading…
Reference in New Issue
Block a user