Can I position the slidebar elsewhere?
What about Vertical ?
Is their special “view” I can use?
I am trying to get two VERTICLE slider bars on left and right side of a landscape screen.
Basically I want the user’s thumbs to move a slider bar up and down.
You can use displayMode(FULLSCREEN) or alternatively press the FullScreen button when running your script. Then you can create the slider bars yourself or use a pre-existing class such as npryces controller class which is my favourite, and its very easy to implement for beginners.
Here’s a simple example. Slide you thumbs up or down the right or left side of the screen. The counters increase each time you slide up and decrement each time you slide down. I put in simple sliders because I don’t know what you want exactly.
supportedOrientations(LANDSCAPE_ANY)
displayMode(FULLSCREEN)
function setup()
x1=0
x2=0
end
function draw()
background(40, 40, 50)
fill(255)
text(x1,100,HEIGHT/2) -- show values
text(x2,WIDTH-100,HEIGHT/2)
drawSliders()
end
function touched(t)
if t.x<WIDTH/2 then
x1=x1+t.deltaY -- left value
else
x2=x2+t.deltaY -- right value
end
end
function drawSliders()
rect(10,HEIGHT/2+x1,50,10) -- show sliders
rect(WIDTH-60,HEIGHT/2+x2,50,10)
end