Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

GetMenuItemsEx

Returns all items of the active menu matching Caption as an array of TMenuResponse records, providing structured access to model, color, and text.

Returns an empty array if no matching menu exists or the character is disconnected.

For string-based output, use GetMenuItems.

Возвращает все элементы активного меню с заголовком Caption в виде массива записей TMenuResponse, предоставляя структурированный доступ к модели, цвету и тексту.

Возвращает пустой массив, если подходящее меню не найдено или персонаж не подключён.

Для строкового вывода используйте GetMenuItems.

Pascal

function GetMenuItemsEx(Caption: String): TMenuResponses;

Type definition:

TMenuResponse = packed record
  Model: Word;
  Color: Word;
  Text: String;
end;

TMenuResponses = TArray<TMenuResponse>;

Python

def GetMenuItemsEx(Caption: str) -> list[MenuItem]: ...

Pascal Example

var
  Items: TMenuResponses;
  i: Integer;
begin
  Items := GetMenuItemsEx('Tinkering');
  for i := 0 to Length(Items) - 1 do
    AddToSystemJournal('Model: $' + IntToHex(Items[i].Model, 4) + ' ' + Items[i].Text);
end.

Python Example

items = GetMenuItemsEx('Tinkering')
for item in items:
    AddToSystemJournal(f'Model: ${item.Model:04X} {item.Text}')

See Also

GetMenuItems, GetLastMenuItems, AutoMenu