2018-01-05 19:21:19 +08:00
|
|
|
|
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
2017-02-14 17:55:54 +08:00
|
|
|
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
|
|
|
|
|
2017-05-18 18:40:20 +08:00
|
|
|
|
using OpenTK.Graphics;
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2017-06-20 13:54:23 +08:00
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
2017-05-18 18:40:20 +08:00
|
|
|
|
using osu.Game.Graphics;
|
|
|
|
|
|
2017-04-18 15:05:58 +08:00
|
|
|
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
2017-02-14 17:55:54 +08:00
|
|
|
|
{
|
2017-05-18 18:40:20 +08:00
|
|
|
|
public class SpinnerBackground : CircularContainer, IHasAccentColour
|
2017-02-14 17:55:54 +08:00
|
|
|
|
{
|
|
|
|
|
public override bool HandleInput => false;
|
2017-05-18 18:40:20 +08:00
|
|
|
|
|
2017-05-18 20:38:19 +08:00
|
|
|
|
protected Box Disc;
|
2017-05-18 18:40:20 +08:00
|
|
|
|
|
|
|
|
|
public Color4 AccentColour
|
|
|
|
|
{
|
2017-05-18 20:38:19 +08:00
|
|
|
|
get
|
|
|
|
|
{
|
|
|
|
|
return Disc.Colour;
|
|
|
|
|
}
|
|
|
|
|
set
|
|
|
|
|
{
|
|
|
|
|
Disc.Colour = value;
|
|
|
|
|
|
2017-06-12 11:48:47 +08:00
|
|
|
|
EdgeEffect = new EdgeEffectParameters
|
2017-05-18 20:38:19 +08:00
|
|
|
|
{
|
2017-05-21 16:21:49 +08:00
|
|
|
|
Hollow = true,
|
2017-05-18 20:38:19 +08:00
|
|
|
|
Type = EdgeEffectType.Glow,
|
2017-05-21 16:21:49 +08:00
|
|
|
|
Radius = 40,
|
|
|
|
|
Colour = value,
|
2017-05-18 20:38:19 +08:00
|
|
|
|
};
|
|
|
|
|
}
|
2017-05-18 18:40:20 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public SpinnerBackground()
|
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both;
|
|
|
|
|
Masking = true;
|
|
|
|
|
|
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
|
|
|
|
Disc = new Box
|
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Alpha = 1,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
2017-02-14 17:55:54 +08:00
|
|
|
|
}
|
|
|
|
|
}
|