Nooby Question;
I currently have it when you touch the blue box a photo is added. On the camera it is sideways. It fixes itself if the user changes orientations, but how do I get it to be rotated the right way starting out? Thanks!
-- AddingPhotos
supportedOrientations( LANDSCAPE_ANY)
-- Use this function to perform your initial setup
function setup()
print("Hello World!")
lines = {"testing 123", "kakakaakakkaak", "joy to the world."}
dy = 0
capturedimaged = nil
end
-- This function gets called once every frame
function draw()
-- This sets a dark background color
background(40, 40, 50)
-- This sets the line thickness
strokeWidth(5)
for i, v in ipairs(lines) do
text(v, WIDTH/2, (HEIGHT/24)*(21-i)+(dy))
end
-- Do your drawing here
local h = HEIGHT/10
local w = WIDTH/1.25
rectMode(CORNER)
fill(106, 106, 106, 255)
rect( 0, (dy)+HEIGHT-h, w, HEIGHT/10)
rectMode( CENTER )
fill(0, 1, 255, 255)
rect( w/2, (dy)+(HEIGHT-h)+HEIGHT/20, WIDTH/10, HEIGHT/10)
end
function Camera()
function draw()
-- cameraSource(CAMERA_BACK, WIDTH/2)
sprite(CAMERA, WIDTH/2, HEIGHT/2, WIDTH/2, HEIGHT/2 )
end
end
function takephoto()
capturedimaged = image(CAMERA_BACK)
end
function touched(t)
if t.state==MOVING then
dy = dy + t.deltaY
end
local a = WIDTH/1.25
local b = WIDTH/20
local c = HEIGHT - (HEIGHT/10)
if CurrentTouch.x > (a/2)-b and CurrentTouch.x < (a/2)+b and CurrentTouch.y > c then
Camera()
print("ksks")
end
end