Reputation: 11
I want the user to enter text in a text box (such as a login text box on some site).
I tried to search in text()
bibliography and other similar functions.
Upvotes: 1
Views: 969
Reputation: 42176
What you're describing is called a graphical user interface, or GUI. There are many ways to approach this problem:
rect()
function to draw a text box, and the keyPressed()
function to detect key presses.Any of the above might work, and which approach you choose depends more on you, your context, and your preferences. We can't tell you which is best, because it's all up to what you prefer.
Upvotes: 1
Reputation: 3207
This guy seems to have figured it out: http://www.sojamo.de/libraries/controlP5/. Look for the textArea control.
If you don't like this, I read that the g4p library had something like an inputbox. Otherwise you will have to draw it yourself (which would be a nice exercise) using keyboard inputs and the like.
Upvotes: 1