J2ME + text input in game

Started by
6 comments, last by rishit 17 years, 11 months ago
Hello! Recently I came across a serious problem. I need a way to retrieve character strings from the user (such as login, player name etc). The point is that I don't want to use a standard TextBox or TextField since it would kill menu appearance of the game. In optimal solution, I'd like to deriviate a new class from TextBox where I would take care of drawing the control myself. The advantage of TextBox is that the input is phone-specific so you don't need to care about different keyboards yourself. Unfortunately, I haven't seen any solution in any game for J2ME yet. Thus, I think it's not a trivial thing. If you have any ideas, please let me know. Thank you!
___Quote:Know where basis goes, know where rest goes.
Advertisement
How about a "block" with letters and a moving cursor, just like the input for high-scores in old arcades?

A B C D E F G H
I J K L M N O P
Q R S T U V W X
Y Z ! ? $ % Del End

Good luck with your project!! :)
or you may try another "arcade" input system, like:

A B _ _ _ _
^

with a cursor (^) , use left-right to move to next position, up-down to select from a range of letters/numbers/other chars.
Quote:Original post by DrBlort
How about a "block" with letters and a moving cursor, just like the input for high-scores in old arcades?

Yes, I was thinking about that. :) The problem is that the solution should be more general. For instance, I'd like to make a chat using my custom graphics display only. How can I do that without the TextBox? Should I 'simply' write implementations for all possible keyboards types ? ;)

Thanks!

___Quote:Know where basis goes, know where rest goes.
There are a few GUI libraries with this functionality available. The best known are J2ME Polish and Synclast.

shmoove
You are the best, shmoove! Thanks a lot :D

Edit : I haven't investigated J2ME Polish too deeply but is it possible to display a GameCanvas and put some additional controls (such as TextBox) on top of it ?
___Quote:Know where basis goes, know where rest goes.
You can't use the high level UI items on a Canvas. But as far as I remember J2ME Polish can take the code for a Form based GUI and convert into it's graphical UI automatically.

shmoove
Can someone please share where to find an implementation for text input for a canvas object. Really need it..thanks

rishit

This topic is closed to new replies.

Advertisement