mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
chore: don't allow submenus on GameObject
This commit is contained in:
parent
ab8eb2dba2
commit
866d500df8
1 changed files with 9 additions and 3 deletions
|
|
@ -1,8 +1,9 @@
|
||||||
using System.Collections.Generic;
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
using Dalamud.Game.Gui.ContextMenus.OldStructs;
|
using Dalamud.Game.Gui.ContextMenus.OldStructs;
|
||||||
using Dalamud.Game.Text.SeStringHandling;
|
using Dalamud.Game.Text.SeStringHandling;
|
||||||
using FFXIVClientStructs.FFXIV.Client.UI;
|
using FFXIVClientStructs.FFXIV.Client.UI;
|
||||||
using FFXIVClientStructs.FFXIV.Client.UI.Agent;
|
|
||||||
|
|
||||||
namespace Dalamud.Game.Gui.ContextMenus
|
namespace Dalamud.Game.Gui.ContextMenus
|
||||||
{
|
{
|
||||||
|
|
@ -75,7 +76,12 @@ namespace Dalamud.Game.Gui.ContextMenus
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="name">The name of the submenu.</param>
|
/// <param name="name">The name of the submenu.</param>
|
||||||
/// <param name="opened">The action to be executed once opened.</param>
|
/// <param name="opened">The action to be executed once opened.</param>
|
||||||
public void AddCustomSubMenu(SeString name, ContextMenuOpenedDelegate opened) =>
|
public void AddCustomSubMenu(SeString name, ContextMenuOpenedDelegate opened)
|
||||||
|
{
|
||||||
|
if (this.GameObjectContext != null)
|
||||||
|
throw new Exception("Submenus on GameObjects are not supported yet.");
|
||||||
|
|
||||||
this.Items.Add(new OpenSubContextMenuItem(name, opened));
|
this.Items.Add(new OpenSubContextMenuItem(name, opened));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue