FivePD API
Interfaces

IMenuService

Handles the UI menus.

Methods

Register

Registers a menu of the given .

UpdateMenuItem

Updated a menu item's property value.

Parameters

NameTypeDescription
playerFPlayerThe player whose menu item needs to be updated.
itemExpression<Func<TMenu, MenuItem>>The property's menu item.
propertyExpression<Func<MenuItem, TProperty>>The property.
valueTPropertyThe new value.

UpdateMenuItem

Updated a menu item's property value.

Parameters

NameTypeDescription
playerFPlayerThe player whose menu item needs to be updated.
itemMenuItemThe menu item to update.
propertyExpression<Func<MenuItem, TProperty>>The property.
valueTPropertyThe new value.

UpdateMenuListItem

Updated a menu list item's property value.

Parameters

NameTypeDescription
playerFPlayerThe player whose menu item needs to be updated.
itemExpression<Func<TMenu, MenuListItem>>The property's menu list item.
propertyExpression<Func<MenuListItem, TProperty>>The property.
valueTPropertyThe new value.

UpdateMenuListItem

Updated a menu list item's property value.

Parameters

NameTypeDescription
playerFPlayerThe player whose menu item needs to be updated.
itemMenuListItemThe menu list item to update.
propertyExpression<Func<MenuListItem, TProperty>>The property.
valueTPropertyThe new value.

UpdateMenuListOption

Updates a menu list item's option property value.

Parameters

NameTypeDescription
playerFPlayerA.
itemExpression<Func<TMenu, MenuListItem>>B.
indexintC.
propertyExpression<Func<MenuListOption, TProperty>>D.
valueTPropertyAA.

AddMenuItem

Adds a menu item to the menu of the given .

Parameters

NameTypeDescription
playerFPlayerThe player.
itemMenuItemThe item to add.

Returns

NameType
stringThe ID of the item.

RemoveMenuItem

Removes a menu item from the menu of the given .

Parameters

NameTypeDescription
playerFPlayerThe player.
itemMenuItemThe ID of the item to remove.