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

GetLastMenuItems

Returns all items of the last (newest) active menu as a list of strings.

Returns nothing if no active menu exists or the character is disconnected.

For other menu methods, see GetMenuItems and GetMenuItemsEx.

Возвращает все элементы последнего (новейшего) активного меню в виде списка строк.

Не возвращает ничего, если нет активного меню или персонаж не подключён.

Для других способов получения меню см. GetMenuItems и GetMenuItemsEx.

DWS

function GetLastMenuItems: TArray<String>;

DWS overload:

procedure GetLastMenuItems(var TL: TStringList);

Pascal Script

procedure GetLastMenuItems(var TL: TStringList);

Python

def GetLastMenuItems() -> list[str]: ...

Pascal Example

DWS:

var
  Items: TArray<String>;
  i: Integer;
begin
  Items := GetLastMenuItems;
  for i := 0 to Length(Items) - 1 do
    AddToSystemJournal(Items[i]);
end.

Pascal Script:

var
  TL: TStringList;
  i: Integer;
begin
  TL := TStringList.Create;
  try
    GetLastMenuItems(TL);
    for i := 0 to TL.Count - 1 do
      AddToSystemJournal(TL[i]);
  finally
    if Assigned(TL) then
      TL.Free;
  end;
end.

Python Example

for item in GetLastMenuItems():
    AddToSystemJournal(item)

See Also

GetMenuItems, AutoMenu, WaitMenu, MenuPresent