mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 21:07:33 +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
|
namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
||||||
{
|
{
|
||||||
public class SliderBall : Container, ISliderProgress
|
public class SliderBall : CircularContainer, ISliderProgress
|
||||||
{
|
{
|
||||||
private readonly Slider slider;
|
private readonly Slider slider;
|
||||||
private Box follow;
|
private Box follow;
|
||||||
@ -39,7 +39,7 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
|||||||
Height = width,
|
Height = width,
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
},
|
},
|
||||||
new Container
|
new CircularContainer
|
||||||
{
|
{
|
||||||
Masking = true,
|
Masking = true,
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
@ -48,7 +48,6 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
|||||||
BorderThickness = 10,
|
BorderThickness = 10,
|
||||||
BorderColour = Color4.White,
|
BorderColour = Color4.White,
|
||||||
Alpha = 1,
|
Alpha = 1,
|
||||||
CornerRadius = width / 2,
|
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new Box
|
new Box
|
||||||
@ -104,8 +103,8 @@ namespace osu.Game.Modes.Osu.Objects.Drawables.Pieces
|
|||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
CornerRadius = DrawWidth / 2;
|
if (Time.Current < slider.EndTime)
|
||||||
Tracking = canCurrentlyTrack && lastState != null && Contains(lastState.Mouse.NativeState.Position) && lastState.Mouse.HasMainButtonPressed;
|
Tracking = canCurrentlyTrack && lastState != null && Contains(lastState.Mouse.NativeState.Position) && lastState.Mouse.HasMainButtonPressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void UpdateProgress(double progress, int repeat)
|
public void UpdateProgress(double progress, int repeat)
|
||||||
|
Loading…
Reference in New Issue
Block a user