1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-26 04:32:55 +08:00
osu-lazer/Templates/Rulesets/ruleset-example/osu.Game.Rulesets.Pippidon/UI/PippidonCursorContainer.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

35 lines
1007 B
C#
Raw Normal View History

2021-04-05 10:41:40 +08:00
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Rulesets.UI;
using osuTK;
namespace osu.Game.Rulesets.Pippidon.UI
{
public partial class PippidonCursorContainer : GameplayCursorContainer
{
private Sprite cursorSprite;
private Texture cursorTexture;
protected override Drawable CreateCursor() => cursorSprite = new Sprite
{
Scale = new Vector2(0.5f),
Origin = Anchor.Centre,
Texture = cursorTexture,
};
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
cursorTexture = textures.Get("character");
if (cursorSprite != null)
cursorSprite.Texture = cursorTexture;
}
}
}