mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Centralise length validation function
This commit is contained in:
@ -135,7 +135,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
|||||||
private void endCurve()
|
private void endCurve()
|
||||||
{
|
{
|
||||||
updateSlider();
|
updateSlider();
|
||||||
EndPlacement(HitObject.Path.ExpectedDistance?.Value > 0);
|
EndPlacement(HitObject.Path.HasValidLength);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
|
@ -30,6 +30,8 @@ namespace osu.Game.Rulesets.Objects
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly Bindable<double?> ExpectedDistance = new Bindable<double?>();
|
public readonly Bindable<double?> ExpectedDistance = new Bindable<double?>();
|
||||||
|
|
||||||
|
public bool HasValidLength => Distance > 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The control points of the path.
|
/// The control points of the path.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Reference in New Issue
Block a user