2019-01-24 08:43:03 +00:00
|
|
|
|
// 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.
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2019-04-02 05:51:28 +00:00
|
|
|
|
using osu.Framework.Graphics.Effects;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
|
|
|
|
using osu.Game.Graphics;
|
2020-07-20 06:19:17 +00:00
|
|
|
|
using osuTK.Graphics;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
2020-12-04 11:21:53 +00:00
|
|
|
|
namespace osu.Game.Rulesets.Osu.Skinning.Default
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2020-07-29 07:37:23 +00:00
|
|
|
|
public class SpinnerFill : CircularContainer, IHasAccentColour
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
2020-07-20 08:48:35 +00:00
|
|
|
|
public readonly Box Disc;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
public Color4 AccentColour
|
|
|
|
|
{
|
2020-07-20 08:48:35 +00:00
|
|
|
|
get => Disc.Colour;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
set
|
|
|
|
|
{
|
2020-07-20 08:48:35 +00:00
|
|
|
|
Disc.Colour = value;
|
2018-04-13 09:19:50 +00:00
|
|
|
|
|
|
|
|
|
EdgeEffect = new EdgeEffectParameters
|
|
|
|
|
{
|
|
|
|
|
Hollow = true,
|
|
|
|
|
Type = EdgeEffectType.Glow,
|
|
|
|
|
Radius = 40,
|
|
|
|
|
Colour = value,
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2020-07-29 07:37:23 +00:00
|
|
|
|
public SpinnerFill()
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
|
|
|
|
RelativeSizeAxes = Axes.Both;
|
|
|
|
|
Masking = true;
|
|
|
|
|
|
2020-07-29 11:01:01 +00:00
|
|
|
|
Anchor = Anchor.Centre;
|
|
|
|
|
Origin = Anchor.Centre;
|
|
|
|
|
|
2018-04-13 09:19:50 +00:00
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
2020-07-20 08:48:35 +00:00
|
|
|
|
Disc = new Box
|
2018-04-13 09:19:50 +00:00
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
RelativeSizeAxes = Axes.Both,
|
|
|
|
|
Alpha = 1,
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|