mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:42:56 +08:00
Add support for sliderb skinning (single frame only)
This commit is contained in:
parent
257c035f30
commit
4322475ad2
@ -28,14 +28,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
set
|
set
|
||||||
{
|
{
|
||||||
accentColour = value;
|
accentColour = value;
|
||||||
if (ball != null)
|
if (drawableBall != null)
|
||||||
ball.Colour = value;
|
drawableBall.Colour = value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private readonly Slider slider;
|
private readonly Slider slider;
|
||||||
public readonly Drawable FollowCircle;
|
public readonly Drawable FollowCircle;
|
||||||
private readonly Box ball;
|
private Drawable drawableBall;
|
||||||
|
|
||||||
public SliderBall(Slider slider)
|
public SliderBall(Slider slider)
|
||||||
{
|
{
|
||||||
@ -55,7 +55,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
{
|
{
|
||||||
Colour = Color4.Orange,
|
Colour = Color4.Orange,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
}, restrictSize: false),
|
}),
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Width = width,
|
Width = width,
|
||||||
@ -68,18 +68,26 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
|||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
|
Alpha = 1,
|
||||||
|
Child = new Container
|
||||||
|
{
|
||||||
|
Width = width,
|
||||||
|
Height = width,
|
||||||
|
// TODO: support skin filename animation (sliderb0, sliderb1...)
|
||||||
|
Child = new SkinnableDrawable("Play/osu/sliderb", _ => new CircularContainer
|
||||||
|
{
|
||||||
|
Masking = true,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
BorderThickness = 10,
|
BorderThickness = 10,
|
||||||
BorderColour = Color4.White,
|
BorderColour = Color4.White,
|
||||||
Alpha = 1,
|
Alpha = 1,
|
||||||
Children = new[]
|
Child = drawableBall = new Box
|
||||||
{
|
|
||||||
ball = new Box
|
|
||||||
{
|
{
|
||||||
Colour = AccentColour,
|
Colour = AccentColour,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
Alpha = 0.4f,
|
Alpha = 0.4f,
|
||||||
Width = width,
|
}
|
||||||
Height = width,
|
}),
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user