Skip to main content

Interface IMenuItem

Interface representing a menu item to be added to a context menu.

Assembly: Dalamud.dll
View Source
Declaration
public interface IMenuItem

Properties

Name

Gets or sets the display name of the menu item.

View Source
Declaration
SeString Name { get; set; }

Prefix

Gets or sets the prefix attached to the beginning of Dalamud.Game.Gui.ContextMenu.IMenuItem.Name.

View Source
Declaration
SeIconChar? Prefix { get; set; }

PrefixChar

Sets the character to prefix the Dalamud.Game.Gui.ContextMenu.IMenuItem.Name with. Will be converted into a fancy boxed letter icon. Must be an uppercase letter.

View Source
Declaration
char? PrefixChar { set; }

PrefixColor

Gets or sets the color of the Dalamud.Game.Gui.ContextMenu.IMenuItem.Prefix. Specifies a Lumina.Excel.GeneratedSheets.UIColor row id.

View Source
Declaration
ushort PrefixColor { get; set; }

UseDefaultPrefix

Gets or sets a value indicating whether the dev wishes to intentionally use the default prefix symbol and color.

View Source
Declaration
bool UseDefaultPrefix { get; set; }

OnClicked

Gets or sets the callback to be invoked when the menu item is clicked.

View Source
Declaration
Action<IMenuItemClickedArgs>? OnClicked { get; set; }

Priority

Gets or sets the priority (or order) with which the menu item should be displayed in descending order. Priorities below 0 will be displayed above the native menu items. Other priorities will be displayed below the native menu items.

View Source
Declaration
int Priority { get; set; }

IsEnabled

Gets or sets a value indicating whether the menu item is enabled. Disabled items will be faded and cannot be clicked on.

View Source
Declaration
bool IsEnabled { get; set; }

IsSubmenu

Gets or sets a value indicating whether the menu item is a submenu. This value is purely visual. Submenu items will have an arrow to its right.

View Source
Declaration
bool IsSubmenu { get; set; }

IsReturn

Gets or sets a value indicating whether the menu item is a return item. This value is purely visual. Return items will have a back arrow to its left. If both Dalamud.Game.Gui.ContextMenu.IMenuItem.IsSubmenu and Dalamud.Game.Gui.ContextMenu.IMenuItem.IsReturn are true, the return arrow will take precedence.

View Source
Declaration
bool IsReturn { get; set; }

Fields

DalamudDefaultPrefix

The default prefix used if no specific preset is specified.

View Source
Declaration
public const SeIconChar DalamudDefaultPrefix = BoxedLetterD

DalamudDefaultPrefixColor

The default prefix color used if no specific preset is specified.

View Source
Declaration
public const ushort DalamudDefaultPrefixColor = 539