Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (611)
Games in Android Showcase (172)
games submitted by our members
Games in WIP (657)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / J2ME / Re: CommandAction, Forms, and Command.OK w/o the send key on: 2007-05-20 01:06:52
Impossible, either don't use Forms or don't rely on the functionality they provide being consistent. across handsets.

Having said that, one suggestion that may help is to simply change the Command type of the softkey.
I know for definite that SamsungA620's report a commandAction event on a Canvas if the Canvas.FIRE action is pressed & either softkey has a Command type of OK attached to it.

Yeah, that wouldnt work for me as I just started porting games at a company and the game uses forms as well as canvas's. It would just be nice functionality to have as the send key shouldnt have functionality within j2me games, but is just a recommendation. Removing it from the canvas is quite easy. Thanks for replying Abuse.
2  Java Game APIs & Engines / J2ME / Re: CommandAction, Forms, and Command.OK w/o the send key on: 2007-05-19 22:49:35
I've just recently read that it is impossible to detect key presses within a form.
So now what I would like to do is disable the send key from having any function in Forms, so that it never calls CommandAction with the Command.SCREEN or Command.OK command type.
3  Java Game APIs & Engines / J2ME / CommandAction, Forms, and Command.OK w/o the send key on: 2007-05-19 15:57:11
 Hi all,

Got a question about Forms and key input.
CommandAction is triggered with Commands that I add. I have added a Command for when the OK key is pressed

namely: Command enterGame = new Command( "Random", Command.OK, 0 );

Then I add the command to the form:
GameForm.addCommand( enterGame );

Then whenever that option is selected it fires off Command.OK to the CommandAction function

However on some phones, (im not sure if others are the same way) that Command.OK is fired off not only when the OK key is pressed, but also when the Send Key is pressed.

The Send key on this particular phone is keycode -11 and the middle softkey is -23, but they both trigger it.
In the CommandAction function I am looking for a way to distinguish which button they used to get it to come in.

I am able to check the keycode in the keypress function for everything else, but in the form it uses those commands.

basically i need to do this:

Command enterGame = new Command( "Game", Command.OK, 0 );

public void commandAction( Command c, Displayable d )

     //check if the commandAction event is triggered by enterGame
     if( c == enterGame)
        // check which button they used to get it to trigger
        //if(send key was pressed)
Pages: [1]
GamerC4 (22 views)
2015-08-22 20:38:50

GamerC4 (21 views)
2015-08-22 20:37:18

GamerC4 (24 views)
2015-08-22 20:37:01

Kefwar (26 views)
2015-08-22 18:07:24

GamerC4 (24 views)
2015-08-22 01:00:24

GamerC4 (37 views)
2015-08-22 01:00:17

GamerC4 (23 views)
2015-08-22 00:57:35

GamerC4 (24 views)
2015-08-22 00:56:59

BurntPizza (29 views)
2015-08-21 01:38:01

KaiHH (43 views)
2015-08-19 15:01:05
Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!