mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 10:52:53 +08:00
Centralise length validation function
This commit is contained in:
parent
965a1ead36
commit
d38e294d96
@ -135,7 +135,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders
|
||||
private void endCurve()
|
||||
{
|
||||
updateSlider();
|
||||
EndPlacement(HitObject.Path.ExpectedDistance?.Value > 0);
|
||||
EndPlacement(HitObject.Path.HasValidLength);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
@ -30,6 +30,8 @@ namespace osu.Game.Rulesets.Objects
|
||||
/// </summary>
|
||||
public readonly Bindable<double?> ExpectedDistance = new Bindable<double?>();
|
||||
|
||||
public bool HasValidLength => Distance > 0;
|
||||
|
||||
/// <summary>
|
||||
/// The control points of the path.
|
||||
/// </summary>
|
||||
|
Loading…
Reference in New Issue
Block a user