Change menu items to be in same order as hotkeys

This commit is contained in:
Dean Herbert 2024-07-04 00:22:46 +09:00
parent 42aff953d9
commit 6abb728cd5
No known key found for this signature in database
1 changed files with 15 additions and 9 deletions

View File

@ -483,20 +483,26 @@ public MenuItem[] ContextMenuItems
curveTypeItems = new List<MenuItem>();
if (!selectedPieces.Contains(Pieces[0]))
// todo: hide/disable items which aren't valid for selected points
foreach (PathType? type in path_types)
{
curveTypeItems.Add(createMenuItemForPathType(null));
curveTypeItems.Add(new OsuMenuItemSpacer());
// special inherit case
if (type == null)
{
if (selectedPieces.Contains(Pieces[0]))
continue;
curveTypeItems.Add(new OsuMenuItemSpacer());
}
curveTypeItems.Add(createMenuItemForPathType(type));
}
// todo: hide/disable items which aren't valid for selected points
curveTypeItems.Add(createMenuItemForPathType(PathType.LINEAR));
curveTypeItems.Add(createMenuItemForPathType(PathType.PERFECT_CURVE));
curveTypeItems.Add(createMenuItemForPathType(PathType.BEZIER));
curveTypeItems.Add(createMenuItemForPathType(PathType.BSpline(4)));
if (selectedPieces.Any(piece => piece.ControlPoint.Type?.Type == SplineType.Catmull))
{
curveTypeItems.Add(new OsuMenuItemSpacer());
curveTypeItems.Add(createMenuItemForPathType(PathType.CATMULL));
}
var menuItems = new List<MenuItem>
{