mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Added ability to edit mod presets
This commit is contained in:
@ -6,6 +6,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
@ -17,7 +18,7 @@ using osu.Game.Rulesets.Mods;
|
||||
|
||||
namespace osu.Game.Overlays.Mods
|
||||
{
|
||||
public partial class ModPresetPanel : ModSelectPanel, IHasCustomTooltip<ModPreset>, IHasContextMenu
|
||||
public partial class ModPresetPanel : ModSelectPanel, IHasCustomTooltip<ModPreset>, IHasContextMenu, IHasPopover
|
||||
{
|
||||
public readonly Live<ModPreset> Preset;
|
||||
|
||||
@ -91,7 +92,8 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
public MenuItem[] ContextMenuItems => new MenuItem[]
|
||||
{
|
||||
new OsuMenuItem(CommonStrings.ButtonsDelete, MenuItemType.Destructive, () => dialogOverlay?.Push(new DeleteModPresetDialog(Preset)))
|
||||
new OsuMenuItem(CommonStrings.ButtonsEdit, MenuItemType.Highlighted, this.ShowPopover),
|
||||
new OsuMenuItem(CommonStrings.ButtonsDelete, MenuItemType.Destructive, () => dialogOverlay?.Push(new DeleteModPresetDialog(Preset))),
|
||||
};
|
||||
|
||||
#endregion
|
||||
@ -102,5 +104,7 @@ namespace osu.Game.Overlays.Mods
|
||||
|
||||
settingChangeTracker?.Dispose();
|
||||
}
|
||||
|
||||
public Popover GetPopover() => new EditPresetPopover(this);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user