From 8f2b68b346d683d050ced0e83de3ea5395f0d6ac Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Sun, 8 Oct 2023 17:35:31 +0200 Subject: [PATCH] Always show resume overlay --- osu.Game.Rulesets.Sentakki/UI/DrawableSentakkiRuleset.cs | 8 ++++++++ osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Sentakki/UI/DrawableSentakkiRuleset.cs b/osu.Game.Rulesets.Sentakki/UI/DrawableSentakkiRuleset.cs index 48ba45181..46e689a3f 100644 --- a/osu.Game.Rulesets.Sentakki/UI/DrawableSentakkiRuleset.cs +++ b/osu.Game.Rulesets.Sentakki/UI/DrawableSentakkiRuleset.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using System.Linq; using osu.Framework.Allocation; @@ -134,5 +135,12 @@ public void OnReleased(KeyBindingReleaseEvent e) { } protected override ResumeOverlay CreateResumeOverlay() => new SentakkiResumeOverlay(); protected override PassThroughInputManager CreateInputManager() => new SentakkiInputManager(Ruleset.RulesetInfo); + + public override void RequestResume(Action continueResume) + { + ResumeOverlay.GameplayCursor = Cursor; + ResumeOverlay.ResumeAction = continueResume; + ResumeOverlay.Show(); + } } } diff --git a/osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs b/osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs index 5c88484f6..1ad643581 100644 --- a/osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs +++ b/osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs @@ -118,10 +118,12 @@ protected override void PopIn() // Reset the countdown, plus a second for preparation remainingTime = (barLength * beatlength) + 1000; - GameplayCursor.ActiveCursor.Hide(); if (localCursorContainer == null) Add(localCursorContainer = new SentakkiCursorContainer()); + + localCursorContainer.State.BindTo(GameplayCursor.State); + GameplayCursor.ActiveCursor.Hide(); } protected override void PopOut() @@ -130,7 +132,9 @@ protected override void PopOut() messageText.Text = SentakkiResumeOverlayStrings.LetsGo; if (localCursorContainer != null && GameplayCursor?.ActiveCursor != null) + { GameplayCursor.ActiveCursor.Position = localCursorContainer.ActiveCursor.Position; + } localCursorContainer?.Expire(); localCursorContainer = null;