ADD: Lua - Dialogs.InputListBox will also return the index of selected item. (#1440)

This commit is contained in:
Skif-off 2024-01-11 07:15:44 +04:00 committed by GitHub
commit cc11730617
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -543,7 +543,11 @@ begin
AValue:= lua_tostring(L, 4);
end;
if ShowInputListBox(ACaption, APrompt, AStringList, AValue, AIndex) then
lua_pushstring(L, AValue)
begin
Result:= 2;
lua_pushstring(L, AValue);
lua_pushinteger(L, AIndex + 1);
end
else begin
lua_pushnil(L);
end;