Skip to main content
Version: 15.x (API 15) [Current]

Class MenuItem

A menu item that can be added to a context menu.

Assembly: Dalamud.dll​
Declaration
public sealed record MenuItem : IMenuItem, IEquatable<MenuItem>

Implements:
Dalamud.Game.Gui.ContextMenu.IMenuItem, System.IEquatable<Dalamud.Game.Gui.ContextMenu.MenuItem>

Properties​

Name​

Gets or sets the display name of the menu item.

Declaration
public SeString Name { get; set; }

Prefix​

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

Declaration
public 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.

Declaration
public char? PrefixChar { set; }

PrefixColor​

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

Declaration
public ushort PrefixColor { get; set; }

UseDefaultPrefix​

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

Declaration
public bool UseDefaultPrefix { get; set; }

OnClicked​

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

Declaration
public 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.

Declaration
public 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.

Declaration
public 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.

Declaration
public 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.

Declaration
public bool IsReturn { get; set; }

Methods​

ToString()​

Declaration
public override string ToString()
Returns​

System.String

GetHashCode()​

Declaration
public override int GetHashCode()
Returns​

System.Int32

Equals(object?)​

Declaration
public override bool Equals(object? obj)
Returns​

System.Boolean

Parameters​
TypeName
System.Objectobj

Equals(MenuItem?)​

Declaration
public bool Equals(MenuItem? other)
Returns​

System.Boolean

Parameters​
TypeName
Dalamud.Game.Gui.ContextMenu.MenuItemother

Implements​