From Stealth Client

Jump to: navigation, search


GetGumpInfo

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

Заполняет структуру gumpInfo информацией гампа находящимся в списке стелса под номером GumpIndex Для определения количества тех или иных элементов используется функция Length.

Пример:

GetGumpInfo(0, gi);
AddToSystemJournal('Gump has ' + IntToStr(Length(gi.GumpButtons)) + ' buttons');

Структура TGumpInfo:

TGumpInfo = record
    Serial : Cardinal;
    GumpID : Cardinal;
    X : Word;
    Y : Word;
    Pages : Integer;
    NoMove : Boolean;
    NoResize : Boolean;
    NoDispose : Boolean;
    NoClose : Boolean;
 
 
    Groups : array of TGroup;
    EndGroups : array of TEndGroup;
    GumpButtons : array of TGumpButton;
    ButtonTileArts : array of TButtonTileArt;
    CheckBoxes : array of TCheckBox;
    CheckerTrans : array of TCheckerTrans;
    CroppedText : array of TCroppedText;
    GumpPics : array of TGumpPic;
    GumpPicTiled : array of TGumpPicTiled;
    RadioButtons : array of TRadio;
    ResizePics : array of TResizePic;
    GumpText : array of TGumpText;
    TextEntries : array of TTextEntry;
    Text : array of string;
    TextEntriesLimited : array of TTextEntryLimited;
    TilePics : array of TTilePic;
    TilePicHue : array of TTilePicHue;
    Tooltips : array of TTooltip;
    HtmlGump : array of THtmlGump;
    XmfHtmlGump : array of TXmfHtmlGump;
    XmfHTMLGumpColor : array of TXmfHTMLGumpColor;
    XmfHTMLTok : array of TXmfHTMLTok;
    ItemProperties : array of TItemProperty;
end;

Описание используемых структур:

  TGroup = record
    groupnumber : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TEndGroup = record
    groupnumber : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TPage =  record
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TMasterGump =  record
    ID : Cardinal;
    ElemNum : Integer;
 end;
 
  TGumpButton =  record
    x, y : Integer;
    released_id : Integer;
    pressed_id : Integer;
    quit : Integer;
    page_id : Integer;
    return_value : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TButtonTileArt =  record
    x, y : Integer;
    released_id : Integer;
    pressed_id : Integer;
    quit : Integer;
    page_id : Integer;
    return_value : Integer;
    art_id : Integer;
    Hue :  Integer;
    art_x, art_y : Integer;
    ElemNum : Integer;
  end;
 
  TCheckBox =  record
    x, y : Integer;
    released_id : Integer;
    pressed_id : Integer;
    status : Integer;
    return_value : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TCheckerTrans =  record
    x, y : Integer;
    width, height : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TCroppedText =  record
    x, y,width, height,color,text_id : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TGumpPic =  record
    x, y : Integer;
    id : Integer;
    Hue : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TGumpPicTiled =  record
    x, y : Integer;
    width, height : Integer;
    gump_id : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TRadio =  record
    x, y : Integer;
    released_id : Integer;
    pressed_id : Integer;
    status : Integer;
    return_value : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TResizePic =  record
    x, y : Integer;
    gump_id : Integer;
    width, height : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TGumpText =  record
    x, y, color : Integer;
    text_id : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TTextEntry =  record
    x, y, width, height, color : Integer;
    return_value : Integer;
    default_text_id : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TTextEntryLimited =  record
    x, y, width, height, color : Integer;
    return_value : Integer;
    default_text_id : Integer;
    Limit : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TTilePic =  record
    x, y : Integer;
    id : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TTilePichue =  record
    x, y : Integer;
    id : Integer;
    color : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TTooltip =  record
    Cliloc_ID : Cardinal;
    Arguments : String;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  THtmlGump =  record
    x, y : Integer;
    width, height : Integer;
    text_id : Integer;
    background : Integer;
    scrollbar : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TXmfHTMLGump =  record
    x, y : Integer;
    width, height : Integer;
    Cliloc_id : Cardinal;
    background : Integer;
    scrollbar : Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TXmfHTMLGumpColor =  record
    x, y : Integer;
    width, height : Integer;
    Cliloc_id : Cardinal;
    background : Integer;
    scrollbar : Integer;
    Hue :  Integer;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TXmfHTMLTok =  record
    x, y : Integer;
    width, height : Integer;
    background : Integer;
    scrollbar : Integer;
    Color : Integer;
    Cliloc_id : Cardinal;
    Arguments : String;
    Page : Integer;
    ElemNum : Integer;
  end;
 
  TItemProperty = packed record
    Prop : Cardinal;
    ElemNum : Integer;
  end;