Sign in to follow this  

J2ME + text input in game

This topic is 4236 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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!! :)

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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 ?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

This topic is 4236 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this