You can add the assets you want to a table and use them. Tap the screen to show each asset at that spot.
displayMode(FULLSCREEN)
function setup()
pos={} -- x,y position touched
tab={readImage("Planet Cute:Character Boy"),
readImage("Planet Cute:Character Cat Girl"),
readImage("Planet Cute:Character Horn Girl"),
readImage("Planet Cute:Character Pink Girl"),
readImage("Planet Cute:Character Princess Girl")}
cnt=0
end
function draw()
background(0)
for a,b in pairs(pos) do
sprite(tab[a],pos[a].x,pos[a].y)
end
end
function touched(t)
if t.state==BEGAN then
if cnt<#tab then
cnt=cnt+1
pos[cnt]=vec2(t.x,t.y)
else
cnt=0
end
end
end
@lidddl Here's an example of getting an image from someplace and saving it to Documents. If you don't want to save it, it can just be used in the program. This is a large image, so it takes a sec or 2 to load.
@lidddl If you want the user to be able to load an image into the project while it's running, you can use pasteboard.image. It wouldn't be perfect, but it would still work
Comments
You can add the assets you want to a table and use them. Tap the screen to show each asset at that spot.
A realy nice idea to show something that's still there, but if it was a ready app I can't add own pictures to the app.
@lidddl Here's an example of getting an image from someplace and saving it to Documents. If you don't want to save it, it can just be used in the program. This is a large image, so it takes a sec or 2 to load.
@lidddl If you want the user to be able to load an image into the project while it's running, you can use
pasteboard.image
. It wouldn't be perfect, but it would still work