mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 11:20:04 +08:00
Move the FollowCircle border to its own container
This commit is contained in:
parent
84135c49ca
commit
c6aabc6d2d
@ -35,6 +35,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
|
||||
private readonly Slider slider;
|
||||
public readonly Drawable FollowCircle;
|
||||
private Drawable fadeFollowCircle;
|
||||
private Drawable drawableBall;
|
||||
|
||||
public SliderBall(Slider slider)
|
||||
@ -44,23 +45,29 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
AutoSizeAxes = Axes.Both;
|
||||
Blending = BlendingMode.Additive;
|
||||
Origin = Anchor.Centre;
|
||||
BorderThickness = 10;
|
||||
BorderColour = Color4.Orange;
|
||||
|
||||
Children = new[]
|
||||
{
|
||||
FollowCircle = new Container
|
||||
{
|
||||
Child = new SkinnableDrawable("Play/osu/sliderfollowcircle", _ => new Box
|
||||
{
|
||||
Colour = Color4.Orange,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
}),
|
||||
Origin = Anchor.Centre,
|
||||
Anchor = Anchor.Centre,
|
||||
Width = width,
|
||||
Height = width,
|
||||
Alpha = 0,
|
||||
Child = new SkinnableDrawable("Play/osu/sliderfollowcircle", _ => new CircularContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Masking = true,
|
||||
BorderThickness = 5,
|
||||
BorderColour = Color4.Orange,
|
||||
Blending = BlendingMode.Additive,
|
||||
Child = fadeFollowCircle = new Box
|
||||
{
|
||||
Colour = Color4.Orange,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Alpha = 0,
|
||||
}
|
||||
}),
|
||||
},
|
||||
new CircularContainer
|
||||
{
|
||||
@ -134,7 +141,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
tracking = value;
|
||||
|
||||
FollowCircle.ScaleTo(tracking ? 2.8f : 1, 300, Easing.OutQuint);
|
||||
FollowCircle.FadeTo(tracking ? 0.2f : 0, 300, Easing.OutQuint);
|
||||
fadeFollowCircle?.FadeTo(tracking ? 0.2f : 0, 300, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user