forked from ppy/osu
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPippidonCursorContainer.cs
More file actions
33 lines (28 loc) · 976 Bytes
/
Copy pathPippidonCursorContainer.cs
File metadata and controls
33 lines (28 loc) · 976 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// 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 System.Numerics;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Rulesets.UI;
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");
cursorSprite?.Texture = cursorTexture;
}
}
}