Hi all, i am relatively new to codea and would be greatful if you might share your favourite thing that you have made in codea just so i can see the level that can be achieved using the lua programming language.
Thx.
Do you love pretending you’re doing complicated stuff on your iPad? Use this small program! Works best with a Bluetooth keyboard and the volume turned up high:
--# Main
-- Wow!
displayMode(FULLSCREEN_NO_BUTTONS)
supportedOrientations(LANDSCAPE_ANY)
function setup()
showKeyboard()
temp = 0
s = ">> "
a = 10
textWrapWidth(WIDTH-2*a)
textMode(CORNER)
fontSize(16)
fill(28, 151, 26, 255)
font("AmericanTypewriter-Bold")
end
function draw()
local t = (math.floor(ElapsedTime-temp)%2 == 0)
local cur
if t then cur = "?" else cur = " " end
background(0, 0, 0, 255)
local w,h = textSize(s.."?")
text(s..cur, a, HEIGHT-a-h)
end
function keyboard(key)
sound(SOUND_BLIT)
temp = ElapsedTime
local b = 1 + bool(string.len(s)%3 == 0)
local k = math.random(0,b)
if k == 2 then k = " 1" end
if key == RETURN then k = "\
>> " end
if key == BACKSPACE then
s = string.sub(s, 1, string.len(s)-1)
else
s = s .. k
end
end
function bool(x)
if x == true then return 1 else return 0 end
end
supportedOrientations(LANDSCAPE_ANY)
displayMode(FULLSCREEN)
function setup()
http.request("http://pastebin.com/raw.php?i=BWGh0GGm",
function(d) loadstring(d)() setup() end,
function() alert("Please check your internet connection") end
)
end