ClientGumpResponsePresent
Returns True if the client has answered the gump with this Serial, shown by SendGumpToClient. The answer itself is read with ClientGumpResponse.
Once present, the answer stays until the character state is reset (disconnect), so the method keeps returning True after the answer was read.
Возвращает True, если клиент ответил на гамп с этим Serial, показанный через SendGumpToClient. Сам ответ читается через ClientGumpResponse.
Пришедший ответ хранится до сброса состояния персонажа (дисконнекта), поэтому метод продолжает возвращать True и после того, как ответ прочитан.
function ClientGumpResponsePresent(Serial: Cardinal): Boolean;
def ClientGumpResponsePresent(Serial: int) -> bool: ...
var
Serial: Cardinal;
G: TGumpInfo;
begin
// ... fill G ...
Serial := SendGumpToClient(G);
while not ClientGumpResponsePresent(Serial) do
begin
// do other work while the menu is open
Wait(500);
end;
AddToSystemJournal('Button: ' + IntToStr(ClientGumpResponse(Serial).ButtonID));
end.
serial = SendGumpToClient(g)
while not ClientGumpResponsePresent(serial):
# do other work while the menu is open
Wait(500)
AddToSystemJournal(f'Button: {ClientGumpResponse(serial).ButtonID}')
SendGumpToClient, ClientGumpResponse, WaitForClientGumpResponse