mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 07:32:55 +08:00
Fix SliderBall weirdness (not correctly staying circular).
Also adjusts tracking to only change during sldier active time.
This commit is contained in:
parent
67105e6dfd
commit
bab219c428
@ -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,8 +103,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
base.Update();
|
||||
|
||||
CornerRadius = DrawWidth / 2;
|
||||
Tracking = canCurrentlyTrack && lastState != null && Contains(lastState.Mouse.NativeState.Position) && lastState.Mouse.HasMainButtonPressed;
|
||||
if (Time.Current < slider.EndTime)
|
||||
Tracking = canCurrentlyTrack && lastState != null && Contains(lastState.Mouse.NativeState.Position) && lastState.Mouse.HasMainButtonPressed;
|
||||
}
|
||||
|
||||
public void UpdateProgress(double progress, int repeat)
|
||||
|
Loading…
Reference in New Issue
Block a user