2017-02-10 13:16:23 +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
|
|
|
|
|
|
|
|
|
|
using OpenTK;
|
2017-02-12 15:19:52 +08:00
|
|
|
|
using OpenTK.Graphics;
|
2017-03-05 02:42:37 +08:00
|
|
|
|
using osu.Framework.Extensions.Color4Extensions;
|
2017-02-10 13:16:23 +08:00
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
using osu.Framework.Graphics.Containers;
|
2017-06-20 13:54:23 +08:00
|
|
|
|
using osu.Framework.Graphics.Shapes;
|
2017-02-10 13:16:23 +08:00
|
|
|
|
|
2017-04-18 15:05:58 +08:00
|
|
|
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Connections
|
2017-02-10 13:16:23 +08:00
|
|
|
|
{
|
|
|
|
|
public class FollowPoint : Container
|
|
|
|
|
{
|
2017-03-07 09:59:19 +08:00
|
|
|
|
private const float width = 8;
|
2017-02-12 15:19:52 +08:00
|
|
|
|
|
2017-02-10 13:16:23 +08:00
|
|
|
|
public FollowPoint()
|
|
|
|
|
{
|
|
|
|
|
Origin = Anchor.Centre;
|
|
|
|
|
|
2017-02-12 15:19:52 +08:00
|
|
|
|
Masking = true;
|
|
|
|
|
AutoSizeAxes = Axes.Both;
|
|
|
|
|
CornerRadius = width / 2;
|
2017-06-12 11:48:47 +08:00
|
|
|
|
EdgeEffect = new EdgeEffectParameters
|
2017-02-12 15:19:52 +08:00
|
|
|
|
{
|
|
|
|
|
Type = EdgeEffectType.Glow,
|
|
|
|
|
Colour = Color4.White.Opacity(0.2f),
|
|
|
|
|
Radius = 4,
|
|
|
|
|
};
|
2017-04-06 16:21:18 +08:00
|
|
|
|
|
2017-02-10 13:16:23 +08:00
|
|
|
|
Children = new Drawable[]
|
|
|
|
|
{
|
2017-02-12 15:19:52 +08:00
|
|
|
|
new Box
|
2017-02-10 13:16:23 +08:00
|
|
|
|
{
|
2017-02-12 15:19:52 +08:00
|
|
|
|
Size = new Vector2(width),
|
2017-02-10 13:16:23 +08:00
|
|
|
|
BlendingMode = BlendingMode.Additive,
|
2017-02-12 15:19:52 +08:00
|
|
|
|
Origin = Anchor.Centre,
|
|
|
|
|
Anchor = Anchor.Centre,
|
|
|
|
|
Alpha = 0.5f,
|
2017-02-10 13:16:23 +08:00
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
2017-04-27 17:07:10 +08:00
|
|
|
|
}
|