Add skinning support to cursor test

This commit is contained in:
Dean Herbert 2019-08-30 13:58:17 +09:00
parent c389a5c798
commit 22e3ad8b9c
4 changed files with 7 additions and 13 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

View File

@ -6,29 +6,23 @@
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Cursor;
using osu.Game.Graphics.Cursor;
using osu.Game.Rulesets.Osu.UI.Cursor;
using osu.Game.Rulesets.UI;
using osu.Game.Tests.Visual;
namespace osu.Game.Rulesets.Osu.Tests
{
[TestFixture]
public class TestSceneGameplayCursor : OsuTestScene, IProvideCursor
public class TestSceneGameplayCursor : SkinnableTestScene
{
private GameplayCursorContainer cursorContainer;
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(CursorTrail) };
public CursorContainer Cursor => cursorContainer;
public bool ProvidingUserCursor => true;
[BackgroundDependencyLoader]
private void load()
{
Add(cursorContainer = new OsuCursorContainer { RelativeSizeAxes = Axes.Both });
SetContents(() => new OsuCursorContainer
{
RelativeSizeAxes = Axes.Both,
Masking = true,
});
}
}
}

View File

@ -84,7 +84,7 @@ public Drawable GetDrawableComponent(string componentName)
return null;
case "Play/osu/cursor":
if (GetTexture("cursor") != null)
if (source.GetTexture("cursor") != null)
return new LegacyCursor();
return null;