Hey all!
I’m playing around trying to make a utility app with some scrolling buttons for different areas of the app. I have been messing with different ways to try to get scrolling buttons to work but keep getting a failure…
Anyone figure out how to do this and want to share?
This is the code I have that starts to do it, but a lot to be desired… I have a feeling it’s going to be a lot harder than it seems.
supportedOrientations(PORTRAIT_ANY)
displayMode(FULLSCREEN)
function setup()
rectMode(CENTER)
by = HEIGHT/2
end
-- This function gets called once every frame
function draw()
pushStyle()
fill(255,0,0,255)
rect(WIDTH/2,by+384,WIDTH,256)
popStyle()
pushStyle()
fill(0,255,0,255)
rect(WIDTH/2,by+128,WIDTH,256)
popStyle()
pushStyle()
fill(0,0,255,255)
rect(WIDTH/2,by-128,WIDTH,256)
popStyle()
pushStyle()
fill(111,111,111,255)
rect(WIDTH/2,by-384,WIDTH,256)
popStyle()
pushStyle()
fill(111,111,0,255)
rect(WIDTH/2,by-640,WIDTH,256)
popStyle()
pushStyle()
fill(0,111,111,255)
rect(WIDTH/2,by-896,WIDTH,256)
popStyle()
by=CurrentTouch.y
end