mirror of https://github.com/ppy/osu
Add skinning support to cursor test
This commit is contained in:
parent
c389a5c798
commit
22e3ad8b9c
Binary file not shown.
After Width: | Height: | Size: 27 KiB |
Binary file not shown.
After Width: | Height: | Size: 7.5 KiB |
|
@ -6,29 +6,23 @@
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
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.Osu.UI.Cursor;
|
||||||
using osu.Game.Rulesets.UI;
|
|
||||||
using osu.Game.Tests.Visual;
|
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Tests
|
namespace osu.Game.Rulesets.Osu.Tests
|
||||||
{
|
{
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class TestSceneGameplayCursor : OsuTestScene, IProvideCursor
|
public class TestSceneGameplayCursor : SkinnableTestScene
|
||||||
{
|
{
|
||||||
private GameplayCursorContainer cursorContainer;
|
|
||||||
|
|
||||||
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(CursorTrail) };
|
public override IReadOnlyList<Type> RequiredTypes => new[] { typeof(CursorTrail) };
|
||||||
|
|
||||||
public CursorContainer Cursor => cursorContainer;
|
|
||||||
|
|
||||||
public bool ProvidingUserCursor => true;
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
Add(cursorContainer = new OsuCursorContainer { RelativeSizeAxes = Axes.Both });
|
SetContents(() => new OsuCursorContainer
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Masking = true,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,7 @@ public Drawable GetDrawableComponent(string componentName)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
case "Play/osu/cursor":
|
case "Play/osu/cursor":
|
||||||
if (GetTexture("cursor") != null)
|
if (source.GetTexture("cursor") != null)
|
||||||
return new LegacyCursor();
|
return new LegacyCursor();
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|
Loading…
Reference in New Issue