osu/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerBackground.cs

56 lines
1.4 KiB
C#
Raw Normal View History

// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2017-05-18 10:40:20 +00:00
using OpenTK.Graphics;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Game.Graphics;
2017-04-18 07:05:58 +00:00
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{
2017-05-18 10:40:20 +00:00
public class SpinnerBackground : CircularContainer, IHasAccentColour
{
public override bool HandleInput => false;
2017-05-18 10:40:20 +00:00
2017-05-18 12:38:19 +00:00
protected Box Disc;
2017-05-18 10:40:20 +00:00
public Color4 AccentColour
{
2017-05-18 12:38:19 +00:00
get
{
return Disc.Colour;
}
set
{
Disc.Colour = value;
EdgeEffect = new EdgeEffect
{
Hollow = true,
2017-05-18 12:38:19 +00:00
Type = EdgeEffectType.Glow,
Radius = 40,
Colour = value,
2017-05-18 12:38:19 +00:00
};
}
2017-05-18 10:40:20 +00: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,
},
};
}
}
}