Input [j2me]

Started by
0 comments, last by shmoove 18 years, 5 months ago
Hello. I want to get some input from my players (highscore name) how would I do this? Can I use a form on the canvas or do I have to do something else when I use the canvas? The ideal way I think would be pulling up a form with a textbox for the name and a ok button, the text would then be saved in a string, and saved to the highscore list... Thanks.
Advertisement
You can't combine form elements with a Canvas GUI so that option is out.

You can either use a TextBox (it's a screen in itself, so there is no need for a Form), or make your own text entry widget with a Canvas. Making one of the old arcade style text entry widgets (where you press up and down to change the letters) is quite easy, and making a full blown graphical textbox isn't too hard either.

Going the high level route (using a TextBox) will be easier and save some jar space, but creating the graphical widget will look much better since you can make it's style consistent with the rest of the game's screens.

shmoove

This topic is closed to new replies.

Advertisement