[gameprogrammer] Re: j2me button mapping
- From: "Peter M." <plm@xxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Thu, 06 Jul 2006 16:08:43 -0700
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
- Follow-Ups:
- [gameprogrammer] Re: j2me button mapping
- From: alexandros mouzakidis
- References:
- [gameprogrammer] j2me button mapping
- From: alexandros mouzakidis
Other related posts:
- » [gameprogrammer] j2me button mapping
- » [gameprogrammer] Re: j2me button mapping
- » [gameprogrammer] Re: j2me button mapping
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- [gameprogrammer] Re: j2me button mapping
- From: alexandros mouzakidis
- [gameprogrammer] j2me button mapping
- From: alexandros mouzakidis