0

I am currently using this bit of code I found:

http://www.pygame.org/project-PyInputBox-2893-.html

It is quite a good way of creating text boxes that users can input into within a pygame window. Basically I want to be able to save their input into a variable I can use at a later point, but not sure how I would go about it.

Cheers for the help in advance.

1
  • Get it using the text variable. In the example on PyGame.org, inp.lst[0].text Commented Dec 6, 2016 at 23:08

1 Answer 1

2

After creating a text_box, the text is stored in text_box.text

mytextbox = text_box(i omitted the arguments)
textinbox = mytextbox.text
print(textinbox)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.