diff --git a/src/core/Global.ttslua b/src/core/Global.ttslua index b7ba459b..0236fc55 100644 --- a/src/core/Global.ttslua +++ b/src/core/Global.ttslua @@ -719,7 +719,43 @@ end -- spawns a bag that contains every object from the library function onClick_downloadAll() + startLuaCoroutine(Global, "multiDownload") +end +function multiDownload() + local data = { + Name = "Bag", + Nickname = "All Downloadable Content", + Transform = { + posX = -39.5, + posY = 2, + posZ = -87, + rotX = 0, + rotY = 270, + rotZ = 0, + scaleX = 1, + scaleY = 1, + scaleZ = 1 + }, + ContainedObjects = {} + } + + -- loop through the library to add content + --for contentType, objectList in pairs(library) do + --for _, params in ipairs(objectList) do + local params = library[contentToShow][currentListItem] + WebRequest.get(SOURCE_REPO .. '/' .. params.url, function (request) + table.insert(data.ContainedObjects, request.text) + spawnObjectData({data = data}) -- need spawnObjectJson + end) + --end + --end + + -- hide download window + if xmlVisibility.downloadWindow then + xmlVisibility.downloadWindow = false + UI.hide('downloadWindow') + end end -- spawns a placeholder box for the selected object