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

GetGumpsCount

Returns the number of active gumps for the current character.

Returns 0 if the character is disconnected or there are no gumps.

Typically used as GetGumpsCount - 1 to reference the last (newest) gump in the list.

Возвращает количество активных гампов текущего персонажа.

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

Обычно используется как GetGumpsCount - 1 для обращения к последнему (новейшему) гампу в списке.

Pascal

function GetGumpsCount: Cardinal;

Python

def GetGumpsCount() -> int: ...

Pascal Example

begin
  if GetGumpsCount > 0 then
    if IsGumpCanBeClosed(GetGumpsCount - 1) then
      CloseSimpleGump(GetGumpsCount - 1);
end.

Python Example

if GetGumpsCount() > 0:
    if IsGumpCanBeClosed(GetGumpsCount() - 1):
        CloseSimpleGump(GetGumpsCount() - 1)

See Also

GetGumpInfo, IsGump, GetGumpID