mirror of
https://github.com/osukey/osukey.git
synced 2025-06-01 10:57:27 +09:00
content Menu
This commit is contained in:
parent
5a1316f0e5
commit
3d746e8dfb
@ -90,12 +90,25 @@ namespace osu.Game.Overlays.Mods
|
|||||||
|
|
||||||
#region IHasContextMenu
|
#region IHasContextMenu
|
||||||
|
|
||||||
public MenuItem[] ContextMenuItems => new MenuItem[]
|
public MenuItem[] ContextMenuItems
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var menu = new List<MenuItem>
|
||||||
{
|
{
|
||||||
new OsuMenuItem(CommonStrings.ButtonsEdit, MenuItemType.Highlighted, this.ShowPopover),
|
new OsuMenuItem(CommonStrings.ButtonsEdit, MenuItemType.Highlighted, this.ShowPopover),
|
||||||
new OsuMenuItem(CommonStrings.ButtonsDelete, MenuItemType.Destructive, () => dialogOverlay?.Push(new DeleteModPresetDialog(Preset))),
|
new OsuMenuItem(CommonStrings.ButtonsDelete, MenuItemType.Destructive, () => dialogOverlay?.Push(new DeleteModPresetDialog(Preset))),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
if (checkCurrentModCanBeSave())
|
||||||
|
{
|
||||||
|
menu.Insert(1, new OsuMenuItem("Use Current Mods", MenuItemType.Destructive, () => SaveCurrentMod()));
|
||||||
|
}
|
||||||
|
|
||||||
|
return menu.ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public bool SaveCurrentMod()
|
public bool SaveCurrentMod()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user