Here’s what I made:
--GDC
--CodeaNoob
function setup()
supportedOrientations(LANDSCAPE_ANY)
saveProjectInfo("Description","50 Line Challenge Entry")
saveProjectInfo("Author","CodeaNoob")
readProjectInfo("Description")
readProjectInfo("Author")
print("Tap to open the Keyboard")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
saveProjectData("Version#", 1.4)
parameter.action("Help?",function()
output.clear()
print("GDC Help Guide\
\
1) Enter the desired Global Variable in the textbox\
\
2) Press Save as Global Data to have the data available to all your projects")
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
end)
parameter.text("GlobalVar","DefaultVar")
parameter.action("Save as Global Data",function()
saveGlobalData(GlobalVar,buffer)
sound(DATA, "ZgBANgBAQD5AQEBAAAAAABC8UD1GWfU+ZABAf0BAQEBAQGpl")
print("Saved as Global Variable: "..GlobalVar)
print("Contents of "..GlobalVar..":\
"..buffer)
print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~")
end)
parameter.color("Background",0,0,0)
parameter.color("Colour",0,255,0)
end
function draw()
Time = os.date("%c")
background(Background)
fill(Colour)
textMode(CORNER)
buffer = keyboardBuffer()
_,bufferHeight = textSize(buffer)
if buffer then
text( buffer, 10, HEIGHT - 30 - bufferHeight )
text(Time,10,10)
text("Version: Beta "..readProjectData("Version#"),10,30)
end
end
function touched(touch)
showKeyboard()
end