mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Implement skinnable sprite text
This commit is contained in:
@ -4,7 +4,6 @@
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
@ -14,7 +13,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class NumberPiece : Container
|
||||
{
|
||||
private readonly SpriteText number;
|
||||
private readonly SkinnableSpriteText number;
|
||||
|
||||
public string Text
|
||||
{
|
||||
@ -41,15 +40,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
},
|
||||
Child = new Box()
|
||||
}, s => s.GetTexture("Play/osu/hitcircle") == null),
|
||||
number = new OsuSpriteText
|
||||
number = new SkinnableSpriteText("Play/osu/number-text", _ => new OsuSpriteText
|
||||
{
|
||||
Text = @"1",
|
||||
Font = @"Venera",
|
||||
UseFullGlyphHeight = false,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
TextSize = 40,
|
||||
Alpha = 1
|
||||
}, restrictSize: false)
|
||||
{
|
||||
Text = @"1"
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user