Skip to main content

Interface IContextMenu

This class provides methods for interacting with the game's context menu.

Assembly: Dalamud.dll
View Source
Declaration
public interface IContextMenu

Methods

AddMenuItem(ContextMenuType, IMenuItem)

Adds a menu item to a context menu.

View Source
Declaration
void AddMenuItem(ContextMenuType menuType, IMenuItem item)
Parameters
TypeNameDescription
Dalamud.Game.Gui.ContextMenu.ContextMenuTypemenuTypeThe type of context menu to add the item to.
Dalamud.Game.Gui.ContextMenu.IMenuItemitemThe item to add.

RemoveMenuItem(ContextMenuType, IMenuItem)

Removes a menu item from a context menu.

View Source
Declaration
bool RemoveMenuItem(ContextMenuType menuType, IMenuItem item)
Returns

System.Boolean: true if the item was removed, false if it was not found.

Parameters
TypeNameDescription
Dalamud.Game.Gui.ContextMenu.ContextMenuTypemenuTypeThe type of context menu to remove the item from.
Dalamud.Game.Gui.ContextMenu.IMenuItemitemThe item to add.

Events

OnMenuOpened

Event that gets fired whenever any context menu is opened.

View Source
Declaration
event IContextMenu.OnMenuOpenedDelegate OnMenuOpened
Event Type

Dalamud.Plugin.Services.IContextMenu.OnMenuOpenedDelegate