Breakroom is now Sinewave Campus. Book a meeting

SPhotos

العميلالشبكة
في هذا الصنفGetUploadedTexture
  1. الدوال
  2. GetUploadedTexture
  3. GetSavedTexture
  4. GetInventoryTextures
  5. OpenUploadFileBrowser
  6. OnUploadEnd
  7. OnUploadStart
الأعضاء 6
دالةGetUploadedTexture–
دالةGetSavedTexture–
دالةGetInventoryTextures–
دالةOpenUploadFileBrowserOpens a window that let's you select a file you wish to upload. (white-label)
دالةOnUploadEndBinds the function c to be called when an upload operation ends.
دالةOnUploadStart–

الدوال​

GetUploadedTexture​

SResource GetUploadedTexture()

القيم المرجعة

SResource

مثال

Lua
resourceTexture = Space.Photos.GetUploadedTexture()

GetSavedTexture​

void GetSavedTexture(string path, Closure onComplete)

المعاملات

المعاملالنوعالوصف
pathstring
onCompleteClosure (Callback)

Closure will be called once the saved texture has been retrieved.
onComplete(SResource)

القيم المرجعة

void

مثال

Lua
function onComplete(SResource)
resourceTexture = SResource
end

Space.Photos.GetSavedTexture('APath', onComplete)

GetInventoryTextures​

Table GetInventoryTextures()

القيم المرجعة

Table

مثال

Lua
tableInventoryTexture = Space.Photos.GetInventoryTextures()

OpenUploadFileBrowser​

void OpenUploadFileBrowser()

Opens a window that let's you select a file you wish to upload. (white-label)

القيم المرجعة

void

مثال

Lua
Space.Photos.OpenUploadFileBrowser()
Lua
--this script will open a file upload browser when clicked
thisObject = Space.Host.ExecutingObject

function OnClickFunction()
Space.Photos.OpenUploadFileBrowser()
end


thisObject.AddClickable()
thisObject.Clickable.Tooltip = "Click me to upload photo"
thisObject.Clickable.OnClick(OnClickFunction)

OnUploadEnd​

void OnUploadEnd(Closure c)

Binds the function c to be called when an upload operation ends.

المعاملات

الاسمالنوعالقيمة الافتراضية
cClosure–

القيم المرجعة

void

مثال

Lua
function c()
--
end

Space.Photos.OnUploadEnd(c)
Lua
--this script will show a text on screen that says "Uploading..." when a photo upload is initiated
--and will hide it when the upload has ended
thisObject = Space.Host.ExecutingObject
textObject = Space.Host.GetReference("textObject") --add a UIText object to References in Scripting Runtime
textObject.UIText.Text = "Uploading..."

function OnUploadStartFunction()
textObject.Active = true
end

function OnUploadEndFunction()
textObject.Active = false
end

Space.Photos.OnUploadStart(OnUploadStartFunction)
Space.Photos.OnUploadEnd(OnUploadEndFunction)

OnUploadStart​

void OnUploadStart(Closure c)

المعاملات

الاسمالنوعالقيمة الافتراضية
cClosure–

القيم المرجعة

void

مثال

Lua
function c()
--
end

Space.Photos.OnUploadStart(c)
Lua
--this script will show a text on screen that says "Uploading..." when a photo upload is initiated
--and will hide it when the upload has ended
thisObject = Space.Host.ExecutingObject
textObject = Space.Host.GetReference("textObject") --add a UIText object to References in Scripting Runtime
textObject.UIText.Text = "Uploading..."

function OnUploadStartFunction()
textObject.Active = true
end

function OnUploadEndFunction()
textObject.Active = false
end

Space.Photos.OnUploadStart(OnUploadStartFunction)
Space.Photos.OnUploadEnd(OnUploadEndFunction)