mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 02:13:21 +08:00
Fix gameplay cursor being hidden in tests/replays (#4667)
Fix gameplay cursor being hidden in tests/replays
This commit is contained in:
commit
3bfd2a4d2f
@ -225,6 +225,12 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
if (replayInputManager.ReplayInputHandler != null)
|
||||
replayInputManager.ReplayInputHandler.GamefieldToScreenSpace = Playfield.GamefieldToScreenSpace;
|
||||
|
||||
if (!ProvidingUserCursor)
|
||||
{
|
||||
// The cursor is hidden by default (see Playfield.load()), but should be shown when there's a replay
|
||||
Playfield.Cursor?.Show();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -4,17 +4,24 @@
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Testing.Input;
|
||||
using osu.Game.Graphics.Cursor;
|
||||
|
||||
namespace osu.Game.Tests.Visual
|
||||
{
|
||||
public abstract class ManualInputManagerTestCase : OsuTestCase
|
||||
{
|
||||
protected override Container<Drawable> Content => InputManager;
|
||||
protected override Container<Drawable> Content => content;
|
||||
private readonly Container content;
|
||||
|
||||
protected readonly ManualInputManager InputManager;
|
||||
|
||||
protected ManualInputManagerTestCase()
|
||||
{
|
||||
base.Content.Add(InputManager = new ManualInputManager { UseParentInput = true });
|
||||
base.Content.Add(InputManager = new ManualInputManager
|
||||
{
|
||||
UseParentInput = true,
|
||||
Child = content = new MenuCursorContainer { RelativeSizeAxes = Axes.Both },
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user