1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 15:27:26 +08:00

Fix SliderBall weirdness (not correctly staying circular).

Also adjusts tracking to only change during sldier active time.
This commit is contained in:
Dean Herbert 2017-02-15 21:51:16 +09:00
parent 67105e6dfd
commit bab219c428
No known key found for this signature in database
GPG Key ID: 46D71BF4958ABB49

View File

@ -11,7 +11,7 @@ using OpenTK.Graphics;
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
{
public class SliderBall : Container, ISliderProgress
public class SliderBall : CircularContainer, ISliderProgress
{
private readonly Slider slider;
private Box follow;
@ -39,7 +39,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
Height = width,
Alpha = 0,
},
new Container
new CircularContainer
{
Masking = true,
AutoSizeAxes = Axes.Both,
@ -48,7 +48,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
BorderThickness = 10,
BorderColour = Color4.White,
Alpha = 1,
CornerRadius = width / 2,
Children = new[]
{
new Box
@ -104,7 +103,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
{
base.Update();
CornerRadius = DrawWidth / 2;
if (Time.Current < slider.EndTime)
Tracking = canCurrentlyTrack && lastState != null && Contains(lastState.Mouse.NativeState.Position) && lastState.Mouse.HasMainButtonPressed;
}