How would I create a text box

On the screen


function setup()
    txt="Text goes here"
end

function draw()
    background(40,40,50)
    rectMode(CENTER)
    fill(255)
    stroke(255,0,0)
    strokeWidth(5)
    rect(300,300,200,50)
    fill(0,255,0)
    text(txt,300,300)  
end

No I mean a text box you can insert text into
Durring a game like
Insert name here

Never mind I found it