1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-29 05:52:56 +08:00

Fix gameplay cursor being hidden in tests/replays

This commit is contained in:
smoogipoo 2019-04-23 13:32:44 +09:00
parent b8712b36ec
commit 6add395288
2 changed files with 12 additions and 2 deletions

View File

@ -225,6 +225,9 @@ namespace osu.Game.Rulesets.UI
if (replayInputManager.ReplayInputHandler != null) if (replayInputManager.ReplayInputHandler != null)
replayInputManager.ReplayInputHandler.GamefieldToScreenSpace = Playfield.GamefieldToScreenSpace; replayInputManager.ReplayInputHandler.GamefieldToScreenSpace = Playfield.GamefieldToScreenSpace;
if (!ProvidingUserCursor)
Playfield.Cursor?.Show();
} }
/// <summary> /// <summary>

View File

@ -4,17 +4,24 @@
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Testing.Input; using osu.Framework.Testing.Input;
using osu.Game.Graphics.Cursor;
namespace osu.Game.Tests.Visual namespace osu.Game.Tests.Visual
{ {
public abstract class ManualInputManagerTestCase : OsuTestCase 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 readonly ManualInputManager InputManager;
protected ManualInputManagerTestCase() 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> /// <summary>