Skip to content

Commit

Permalink
Always show resume overlay
Browse files Browse the repository at this point in the history
  • Loading branch information
LumpBloom7 committed Oct 8, 2023
1 parent d93c431 commit 8f2b68b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions osu.Game.Rulesets.Sentakki/UI/DrawableSentakkiRuleset.cs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Allocation;
Expand Down Expand Up @@ -134,5 +135,12 @@ public void OnReleased(KeyBindingReleaseEvent<GlobalAction> 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();
}
}
}
6 changes: 5 additions & 1 deletion osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,12 @@ protected override void PopIn()
// Reset the countdown, plus a second for preparation
remainingTime = (barLength * beatlength) + 1000;

GameplayCursor.ActiveCursor.Hide();

Check notice on line 121 in osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs

View check run for this annotation

codefactor.io / CodeFactor

osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs#L121

The code must not contain multiple blank lines in a row. (SA1507)
if (localCursorContainer == null)
Add(localCursorContainer = new SentakkiCursorContainer());

localCursorContainer.State.BindTo(GameplayCursor.State);
GameplayCursor.ActiveCursor.Hide();
}

protected override void PopOut()
Expand All @@ -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;
Expand Down

0 comments on commit 8f2b68b

Please sign in to comment.