1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-07 05:47:18 +08:00

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

55 lines
1.4 KiB
C#
Raw Normal View History

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