Table of Contents

Interface IMenu.IManagedInterface

Namespace
SampSharp.OpenMp.Core.Api
Assembly
SampSharp.OpenMp.Core.dll

Represents the managed interface implemented by its unmanaged counterpart.

public interface IMenu.IManagedInterface : IUnmanagedInterface
Inherited Members

Methods

AddCell(string, byte)

Adds a cell with text to a menu column.

int AddCell(string itemText, byte column)

Parameters

itemText string

The text for the cell.

column byte

The column index (0 or 1).

Returns

int

The row index of the added cell.

Disable()

Disables the entire menu.

void Disable()

DisableRow(byte)

Disables a menu row, making it unselectable.

void DisableRow(byte row)

Parameters

row byte

The row index to disable.

GetCell(byte, byte)

Gets the text of a menu cell.

string? GetCell(byte column, byte row)

Parameters

column byte

The column index.

row byte

The row index.

Returns

string

The cell text, or null if empty.

GetColumnCount()

Gets the number of columns in the menu.

int GetColumnCount()

Returns

int

The number of columns (typically 1 or 2).

GetColumnHeader(byte)

Gets the header text of a menu column.

string? GetColumnHeader(byte column)

Parameters

column byte

The column index.

Returns

string

The header text, or null if not set.

GetColumnWidths()

Gets the widths of the menu columns.

Vector2 GetColumnWidths()

Returns

Vector2

A Vector2 containing the widths of the columns.

GetPosition()

Gets the position of the menu.

ref Vector2 GetPosition()

Returns

Vector2

A reference to the menu's position as a Vector2.

GetRowCount(byte)

Gets the number of rows in a menu column.

int GetRowCount(byte column)

Parameters

column byte

The column index.

Returns

int

The number of rows in the column.

HideForPlayer(IPlayer)

Hides the menu from a player.

void HideForPlayer(IPlayer player)

Parameters

player IPlayer

The player to hide the menu from.

InitForPlayer(IPlayer)

Initializes the menu for a player (called before showing).

void InitForPlayer(IPlayer player)

Parameters

player IPlayer

The player to initialize the menu for.

IsEnabled()

Checks if the menu is enabled.

bool IsEnabled()

Returns

bool

true if the menu is enabled; otherwise, false.

IsRowEnabled(byte)

Checks if a menu row is enabled.

bool IsRowEnabled(byte row)

Parameters

row byte

The row index to check.

Returns

bool

true if the row is enabled; otherwise, false.

SetColumnHeader(string, byte)

Sets the header text for a menu column.

void SetColumnHeader(string header, byte column)

Parameters

header string

The header text to display.

column byte

The column index (0 or 1).

ShowForPlayer(IPlayer)

Shows the menu to a player.

void ShowForPlayer(IPlayer player)

Parameters

player IPlayer

The player to show the menu to.