Skip to content

Commit

Permalink
Merge pull request #501 from LumpBloom7/Touchscreen-resume-overlay
Browse files Browse the repository at this point in the history
Fix resume overlay not showing when using touchscreen
  • Loading branch information
LumpBloom7 authored Oct 26, 2023
2 parents d93c431 + 09bce3d commit 671f49c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
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();
}
}
}
7 changes: 5 additions & 2 deletions osu.Game.Rulesets.Sentakki/UI/SentakkiResumeOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,11 @@ 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()
Expand All @@ -130,7 +131,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 671f49c

Please sign in to comment.