mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 04:52:57 +08:00
Fix broken conditional
This commit is contained in:
parent
acd703c27b
commit
c1fffde10d
@ -56,7 +56,7 @@ namespace osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks.Components
|
||||
|
||||
Position = slider.StackedPosition + slider.ControlPoints[index];
|
||||
|
||||
marker.Colour = segmentSeparator ? colours.Red : colours.Yellow;
|
||||
marker.Colour = isSegmentSeparator ? colours.Red : colours.Yellow;
|
||||
|
||||
path.ClearVertices();
|
||||
|
||||
@ -100,8 +100,19 @@ namespace osu.Game.Rulesets.Osu.Edit.Masks.SliderMasks.Components
|
||||
|
||||
protected override bool OnDragEnd(DragEndEvent e) => true;
|
||||
|
||||
private bool segmentSeparator => index != 0 && index != slider.ControlPoints.Length - 1
|
||||
&& slider.ControlPoints[index - 1] != slider.ControlPoints[index]
|
||||
&& slider.ControlPoints[index + 1] != slider.ControlPoints[index];
|
||||
private bool isSegmentSeparator
|
||||
{
|
||||
get
|
||||
{
|
||||
bool separator = false;
|
||||
|
||||
if (index < slider.ControlPoints.Length - 1)
|
||||
separator |= slider.ControlPoints[index + 1] == slider.ControlPoints[index];
|
||||
if (index > 0)
|
||||
separator |= slider.ControlPoints[index - 1] == slider.ControlPoints[index];
|
||||
|
||||
return separator;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user