2017-02-07 12:59:30 +08:00
|
|
|
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
2016-12-06 17:56:20 +08:00
|
|
|
|
|
2017-03-05 02:42:37 +08:00
|
|
|
|
using osu.Framework.Extensions.Color4Extensions;
|
2016-11-17 16:20:51 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
2017-02-15 22:23:55 +08:00
|
|
|
|
using osu.Game.Graphics.Sprites;
|
|
|
|
|
using OpenTK.Graphics;
|
2016-11-17 16:20:51 +08:00
|
|
|
|
|
2017-04-18 15:05:58 +08:00
|
|
|
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
2016-11-17 16:20:51 +08:00
|
|
|
|
{
|
|
|
|
|
public class NumberPiece : Container
|
|
|
|
|
{
|
2017-03-23 12:41:50 +08:00
|
|
|
|
private readonly SpriteText number;
|
2017-02-15 22:23:55 +08:00
|
|
|
|
|
|
|
|
|
public string Text
|
|
|
|
|
{
|
|
|
|
|
get { return number.Text; }
|
|
|
|
|
set { number.Text = value; }
|
|
|
|
|
}
|
2016-11-17 16:20:51 +08:00
|
|
|
|
|
|
|
|
|
public NumberPiece()
|
|
|
|
|
{
|
|
|
|
|
Anchor = Anchor.Centre;
|
|
|
|
|
Origin = Anchor.Centre;
|
|
|
|
|
|
2017-02-15 22:23:55 +08:00
|
|
|
|
Children = new Drawable[]
|
2016-11-17 16:20:51 +08:00
|
|
|
|
{
|
2017-02-15 22:23:55 +08:00
|
|
|
|
new CircularContainer
|
|
|
|
|
{
|
2017-03-22 14:27:22 +08:00
|
|
|
|
Masking = true,
|
|
|
|
|
Origin = Anchor.Centre,
|
2017-06-12 11:48:47 +08:00
|
|
|
|
EdgeEffect = new EdgeEffectParameters
|
2017-02-15 22:23:55 +08:00
|
|
|
|
{
|
|
|
|
|
Type = EdgeEffectType.Glow,
|
|
|
|
|
Radius = 60,
|
|
|
|
|
Colour = Color4.White.Opacity(0.5f),
|
|
|
|
|
},
|
|
|
|
|
Children = new[]
|
|
|
|
|
{
|
|
|
|
|
new Box()
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
number = new OsuSpriteText
|
2016-11-17 16:20:51 +08:00
|
|
|
|
{
|
2017-02-15 22:23:55 +08:00
|
|
|
|
Text = @"1",
|
|
|
|
|
Font = @"Venera",
|
|
|
|
|
UseFullGlyphHeight = false,
|
2016-11-17 16:20:51 +08:00
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Origin = Anchor.Centre,
|
2017-02-15 22:23:55 +08:00
|
|
|
|
TextSize = 40,
|
2016-11-17 16:20:51 +08:00
|
|
|
|
Alpha = 1
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|