1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 21:43:04 +08:00

Merge pull request #17282 from peppy/skin-editor-reset-position

Add "Reset position" menu item in skin editor
This commit is contained in:
Dan Balasescu 2022-03-17 14:20:24 +09:00 committed by GitHub
commit e3cbde5099
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,6 +199,12 @@ namespace osu.Game.Skinning.Editor
Items = createAnchorItems((d, o) => ((Drawable)d).Origin == o, applyOrigins).ToArray()
};
yield return new OsuMenuItem("Reset position", MenuItemType.Standard, () =>
{
foreach (var blueprint in SelectedBlueprints)
((Drawable)blueprint.Item).Position = Vector2.Zero;
});
foreach (var item in base.GetContextMenuItemsForSelection(selection))
yield return item;