Textbox

Im still quite new to Lua and Codea and was wondering how do you make a textbox i have found a link that can make one but im not sure if there is an easrier way (like 5 classes total of like 1,500 lines of code). Im also not sure how to implement this code in main. (im new to programing i took a semsester of Java honors last year but we were only doing console based code) Plz help if you can I need to know for my internship

Heh - where did you see a link for a text box? I did the font stuff, and a nice input form is something I’ve been thinking about and expecting to spring on everyone as a surprise. If someone already did it, I’m keenly interested :slight_smile:

(1500 lines is a ton - the font is only maybe 100, and I expect I’ll need another 100 for an on-screen keyboard, and maybe 50 for an input…)

Right now, there’s no native support for either text fonts, or for keyboard - you’ll need to roll your own.

lol for got to add the link here it is http://code.google.com/p/corsix-th/source/browse/trunk/CorsixTH/Lua/window.lua#752

im not sure if this works for Codea, its for a game programed with Lua but im not sure how i would implement it in main

Yep - that’s lua, but not Codify code.

lua is weird; it’s originally intended to be embedded, so the Input/Output API tends to vary wildly depending on where it’s embedded. You can often (usually!) move logic around, but for the most part things needing to do I/O or user interaction will change dramatically. Point is, a lua program that prompts a user for input and does something with it will be very different depending on where it lives.

Codify is based very much on Processing, which is focused on graphics processing - things like text boxes are mostly not there at all yet. They will likely show in future releases - but until then, we have to roll our own using graphics primitives like lines, circles and the like. We’re moving in that direction - I have some pretty good Font drawing code. But we’re not there yet.

oh ok, thanks for the help anyway