[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Is there an InputBox function in pygame/python?



D. Hartley wrote:

I am trying to create a box on the graphics window which asks a user
for their name. My research led me to the "InputBox" function, which
is said to "get user input, allowing backspace etc shown in a box in
the middle of the screen" (but ignores the shift key?). I found
several pages that refer to it, and one example on google, but it
seems very cryptic to me, and I can't find any other help materials. I tried help(InputBox), tried to use the function itself, tried to
search for it in the documentation on python.org, and tried to google
it (InputBox, Python). I got a half-million websites talking about
VBS and other versions of InputBox, and can't find one (besides the
cryptic one) for python. Does this function exist? Or is it called
something else? Can someone point me to an
explanation/definition/simple example? Like I said, I am just trying
to ask for a user name, it is nothing more (or less!) complicated than
that.


Thanks for any pointers you might have!


I'm quite sure nothing like this is in pygame. It would belong to a gui based on pyGame. I'm also sure many people coded such a thing for themselves. (Highscorelists, Playername, etc.)

I need one myself atm, so i'll have a go at a simple input function.

The trouble is, there are different kind of main loops, who calls the update function, who blits it's screen to the screen?

I'll try to code one NOW, i'll post it (will take maybe half an hour, i hope).

Are attachments allowed on the list?

Daniel