Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ private IEnumerable<MenuItem> createContextMenuItems()
Items = [.. endLaneItems.OrderBy(i => i.Item1).Select(i => i.Item2)]
};

if (SlidePaths.CheckSlideValidity(segment with { Mirrored = !segment.Mirrored }, true))
{
yield return new TernaryStateToggleMenuItem("Mirrored", action: _ => mirrorSegment())
{
State = { Value = segment.Mirrored ? TernaryState.True : TernaryState.False }
};
}

yield return new OsuMenuItem("Duplicate segment", MenuItemType.Standard, action: duplicateSegment);

if (slideBodyInfo.Segments.Count > 1)
Expand Down Expand Up @@ -158,6 +166,19 @@ private void duplicateSegment()
beatmap.Update(slide);
}

private void mirrorSegment()
{
var segments = slideBodyInfo.Segments.ToList();

var segment = segments[SegmentIndex];
segment.Mirrored = !segment.Mirrored;

segments[SegmentIndex] = segment;

slideBodyInfo.Segments = segments;
beatmap.Update(slide);
}

private void changeShape(PathShape shape)
{
if (segment.Shape == shape)
Expand Down
Loading