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

GetGumpInfo

Returns the full structured gump information for the gump at index GumpIndex as a TGumpInfo record.

This record contains all gump elements: buttons, text entries, checkboxes, radio buttons, pictures, HTML areas, and more.

Returns an empty record if the index is out of range or the character is disconnected.

Возвращает полную структурированную информацию о гампе с индексом GumpIndex в виде записи TGumpInfo.

Запись содержит все элементы гампа: кнопки, текстовые поля, чекбоксы, радиокнопки, изображения, HTML-области и многое другое.

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

DWS

function GetGumpInfo(GumpIndex: Word): TGumpInfo;

DWS overload:

procedure GetGumpInfo(GumpIndex: Word; var GumpInfo: TGumpInfo);

Pascal Script

procedure GetGumpInfo(GumpIndex: Word; var GumpInfo: TGumpInfo);

Python

def GetGumpInfo(GumpIndex: int) -> GumpInfo: ...

Pascal Example

PascalScript:

var
  gi: TGumpInfo;
begin
  GetGumpInfo(0, gi);
  AddToSystemJournal('GumpID: $' + IntToHex(gi.GumpID, 8));
  AddToSystemJournal('Buttons: ' + IntToStr(Length(gi.GumpButtons)));
  AddToSystemJournal('Text lines: ' + IntToStr(Length(gi.Text)));
end.

DWScript — auto-stringify the entire record:

begin
  AddToSystemJournal(GetGumpInfo(0));
end.

Python Example

gi = GetGumpInfo(0)
AddToSystemJournal(f'GumpID: ${gi.GumpID:08X}')
AddToSystemJournal(f'Buttons: {len(gi.GumpButtons)}')
AddToSystemJournal(f'Text lines: {len(gi.Text)}')

See Also

GetGumpsCount, GetGumpID, GetGumpSerial, GetGumpTextLines, NumGumpButton, WaitGump, CloseSimpleGump