| Reply | « Previous Thread | Next Thread » |
|
I was using addcommand to create a menu that will pop up when the user presses a softkey during the game.
But there was no way to make the game pause when the user pressed the softkey so the game used to play on while the user could see only a selection of commands. Is there away to over-ride the softkeys using keycodes, using only MIDP 1 and not using any specific nokia functionality. I know there is a way to handle the softkey codes using fullcanvas but would rather not use this. Thanks Brian
Last edited by Woody_FX : 2003-11-30 at 17:21.
|
|
You may get keyPress events for the soft keys even in a regular Canvas. However, the specification doesn't say you do, nor does it say what codes the soft keys should have, so you're on shakey ground. Not all phones (I mean, non-Nokia) generate the same key-codes for soft keys, and some generate only keyPress events, and no keyRelease.
Hmmm... sorry, that doesn't help you much, does it! It depends on how many phones you want the same build of your game to work on. Otherwise, you're probably stuck with 0-9, * and #. Graham. |
| grahamhughes |
| View Public Profile |
| Find all posts by grahamhughes |
|
Umm ....
I suppose if thats all thats offered then i will have to the best i can with it. Do you know the keycodes off the softkeys. I just want to call a list to appear when the softkey is pressed and pause the game, so keypressed should do it. Thanks Brian |
|
I don't think you'll get softkeys presses on Nokia phones unless you use FullCanvas. Otherwise existing games would use it already and this approach would be recommended in Nokia documents.
Quite recently I had a look at Miki's world that is supposed to be an example for developers. At least Nokia uses at as an example in some document. It doesn't pause when softkey is pressed. However you don't have to trust me :) Make a test that reacts to the KeyPressed and draws keyCode on screen or beeps or whatever. Then post results here :) |
|
I don't recommend to rely on "catchig" sotkey-press in tricky way. It maybe work on actual device, but not on the newly released devices even if they in the same serial. That's happened with 6600, most game falls to run on it...
Just put a Pause command on the RSK, and let the user pause if he want, and of course pause by code, if new screen appears. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|