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.
function GetMenuItemsEx(Caption: String): TMenuResponses;
Type definition:
TMenuResponse = packed record
Model: Word;
Color: Word;
Text: String;
end;
TMenuResponses = TArray<TMenuResponse>;
def GetMenuItemsEx(Caption: str) -> list[MenuItem]: ...
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.
items = GetMenuItemsEx('Tinkering')
for item in items:
AddToSystemJournal(f'Model: ${item.Model:04X} {item.Text}')