@Cozman Is this something like what you’re after. Of course you’ll have to add your own images. Also, I limit the selection to 1 to 4 images since I don’t know exactly what you want. I also didn’t spend a lot of time on this, so if someone else wants to adjust this, go ahead.
displayMode(FULLSCREEN)
supportedOrientations(LANDSCAPE_ANY)
function setup()
rectMode(CENTER)
spriteMode(CENTER)
w=HEIGHT
pCount=0
selectDone=false
dx=0
iTab={}
sTab={}
pTab={}
table.insert(iTab,readImage("Planet Cute:Character Boy"))
table.insert(iTab,readImage("Planet Cute:Character Cat Girl"))
table.insert(iTab,readImage("Planet Cute:Character Horn Girl"))
table.insert(iTab,readImage("Planet Cute:Character Pink Girl"))
table.insert(iTab,readImage("Planet Cute:Character Princess Girl"))
table.insert(iTab,readImage("Planet Cute:Gem Blue"))
table.insert(iTab,readImage("Planet Cute:Gem Green"))
table.insert(iTab,readImage("Planet Cute:Gem Orange"))
table.insert(iTab,readImage("Planet Cute:Heart"))
table.insert(iTab,readImage("Planet Cute:Enemy Bug"))
table.insert(iTab,readImage("Planet Cute:Tree Short"))
table.insert(iTab,readImage("Planet Cute:Tree Tall"))
table.insert(iTab,readImage("Planet Cute:Rock"))
table.insert(iTab,readImage("Planet Cute:Star"))
end
function draw()
background(40,40,50)
fill(255)
if not selectDone then
for a,b in pairs(iTab) do
sprite(b,a*100+dx,HEIGHT-100,100)
end
for z=1,#pTab do
sprite(pTab[z],sTab[z].x,sTab[z].y,100)
end
fill(21, 217, 248, 255)
text("Slide images left or right then double tap an image for selection (4 max)",WIDTH/2,HEIGHT-200)
text("When selections are done, tap Selection done button.",WIDTH/2,HEIGHT-250)
rect(WIDTH/2,200,200,50)
fill(255)
text("Selection done",WIDTH/2,200)
if pCount==1 then
px=WIDTH/2
py=HEIGHT/2
end
end
if selectDone then
if pCount==1 then
sprite(pTab[1],WIDTH/2,HEIGHT*.65,w/1.3)
elseif pCount==2 then
sprite(pTab[1],WIDTH*.25,HEIGHT*.6,w/2)
sprite(pTab[2],WIDTH*.75,HEIGHT*.6,w/2)
elseif pCount==3 then
sprite(pTab[1],WIDTH*.2,HEIGHT*.6,w/3)
sprite(pTab[2],WIDTH*.5,HEIGHT*.6,w/3)
sprite(pTab[3],WIDTH*.8,HEIGHT*.6,w/3)
elseif pCount==4 then
sprite(pTab[1],WIDTH*.25,HEIGHT*.85,w/3)
sprite(pTab[2],WIDTH*.75,HEIGHT*.85,w/3)
sprite(pTab[3],WIDTH*.25,HEIGHT*.35,w/3)
sprite(pTab[4],WIDTH*.75,HEIGHT*.35,w/3)
end
end
end
function touched(t)
if t.state==MOVING then
dx=dx+t.deltaX
return
end
if t.state==BEGAN then
if t.x>WIDTH/2-100 and t.x<WIDTH/2+100 and t.y>175 and t.y<225 then
selectDone=true
end
if t.tapCount==2 then
for a,b in pairs(iTab) do
if t.x>a*100+dx-50 and t.x<a*100+dx+50 and t.y>HEIGHT-150 then
if pCount<4 then
pCount = pCount + 1
table.insert(sTab,vec2(pCount*100,HEIGHT/2+70))
table.insert(pTab,b)
end
end
end
end
end
end