|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [gameprogrammer] Re: j2me button mapping
alexandros mouzakidis wrote: Have anyone of you any idea about how can i detect if the cancel button pressed??????????????? Depends on the handset. Try overriding Canvas.keyPressed(), record the value received somewhere, like a text log or on the screen, and see what value you get when the key is pressed. Then hard-wire that value into your code for that handset. J2ME API does not specify a keyPressed() value for cancel buttons, but most handsets deliver one anyway. If you are not getting keyPressed() events, try adding a Command of type CANCEL or BACK to the Displayable; then, you may have to use a CommandListener or you may then be able to get keyPressed(). Sometimes a cancel button automatically gets mapped to the CANCEL/BACK Command, if any. Peter M --------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
|
|