mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 07:23:14 +08:00
General cleanups
This commit is contained in:
parent
c18f2e6436
commit
53f7c753fb
@ -99,7 +99,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components
|
||||
|
||||
private bool deleteSelected()
|
||||
{
|
||||
List<PathControlPoint> toRemove = Pieces.Where(p => p.IsSelected.Value).Select(p => p.Index).Select(i => slider.Path.ControlPoints[i]).ToList();
|
||||
List<PathControlPoint> toRemove = Pieces.Where(p => p.IsSelected.Value).Select(p => slider.Path.ControlPoints[p.Index]).ToList();
|
||||
|
||||
// Ensure that there are any points to be deleted
|
||||
if (toRemove.Count == 0)
|
||||
|
@ -41,7 +41,6 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
segmentStart = HitObject.Path.ControlPoints[0];
|
||||
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
@ -150,9 +149,11 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
||||
case 2:
|
||||
segmentStart.Type.Value = PathType.Linear;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
segmentStart.Type.Value = PathType.PerfectCurve;
|
||||
break;
|
||||
|
||||
default:
|
||||
segmentStart.Type.Value = PathType.Bezier;
|
||||
break;
|
||||
|
@ -6,7 +6,6 @@ using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Lines;
|
||||
using osu.Framework.MathUtils;
|
||||
using osu.Game.Rulesets.Objects;
|
||||
using osu.Game.Rulesets.Objects.Types;
|
||||
using osuTK;
|
||||
@ -141,6 +140,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
case 2:
|
||||
path.ControlPoints.AddRange(createSegment(PathType.PerfectCurve, Vector2.Zero, new Vector2(0, 100)));
|
||||
break;
|
||||
|
||||
case 4:
|
||||
path.ControlPoints.AddRange(createSegment(PathType.PerfectCurve, Vector2.Zero, new Vector2(0, 100), new Vector2(100), new Vector2(100, 0)));
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user