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

GetGumpButtonsDescription

Retrieve all Buttons info for the gump with list index GumpIndex

Returns nothing if gump index incorrect (out of gumps list) or char disconnected.

Method is similar to GetGumpShortLines and GetGumpFullLines, but contains info ONLY for buttons.

Warning: param (with type TStringList) should be created before calling GetFindedList and be disposed after!

NB: DWS have overloaded method version, which returns array of string and dont need any init before.

Pascal Script:

procedure GetGumpButtonsDescription(GumpIndex : Integer; var TL : TStringList);

DWS:

procedure GetGumpButtonsDescription(GumpIndex : Integer; var TL : TStringList);
function GetGumpButtonsDescription(GumpIndex : Word) : TArray<String>;

Pascal Script Example:

var 
b : TStringList; 
i,k : Integer; 

Begin 
b := TStringList.Create; 
for i := 0 to GetGumpsCount - 1 do 
begin  
  GetGumpButtonsDescription(i,b); 
  if b.Count > 0 then
  begin
    for k := 0 to b.Count - 1 do   
      if b.Strings[i] = 'xxx' then
      //some work here  
  end; 
end;
b.free; 
End.

Python Syntax:

def GetGumpButtonsDescription(GumpIndex): --> list of string