How to have multiple text input boxes

J

JeddeBabbe

Guest
So I need up to 6 players to enter their name. That's it!

I know how to make 1 textbox, but not how to make multiple boxes that you need to select before typing a name in it. Any help would be appreciated! :)

The code I currently have for 1 working textbox comes from this page:
But I'm open to new mechanics.

~JB
 

NightFrost

Member
Well, since more than one person can't write on the same keyboard at the same time... One option is you could have the same input box ask for names one at a time. Have it display a caption above saying "Enter player N name" where N is a number counting from 1 to 6. Add an "OK" button that saves the name wherever necessary, clears the input box content and increases the N by one. Once all six have been entered, the game proceeds to whatever the next intended step is. (If you have an option to select number of players, the count would run up to that instead of always to 6.)
 
J

JeddeBabbe

Guest
Well, since more than one person can't write on the same keyboard at the same time... One option is you could have the same input box ask for names one at a time. Have it display a caption above saying "Enter player N name" where N is a number counting from 1 to 6. Add an "OK" button that saves the name wherever necessary, clears the input box content and increases the N by one. Once all six have been entered, the game proceeds to whatever the next intended step is. (If you have an option to select number of players, the count would run up to that instead of always to 6.)
That's smart! Thanks! I'll give it a try
 
Thats very cool, i need something similar. I need X amount of text boxes depending on how many players there are that the user inputs at the start. I also need somehow name sprites with those names lol
 
Top