You Are Here:

Community: Developer Discussion Boards

#1 Old Handling Softkeys being pressed during game. - 2003-11-30, 17:18

Join Date: Aug 2003
Posts: 182
Location: Eire
Woody_FX
Offline
Regular Contributor
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.
Reply With Quote

#2 Old 2003-11-30, 21:51

Join Date: Jun 2003
Posts: 4,325
Location: Cheshire, UK
grahamhughes's Avatar
grahamhughes
Offline
Forum Nokia Champion
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.
Reply With Quote

#3 Old 2003-12-01, 09:49

Join Date: Aug 2003
Posts: 182
Location: Eire
Woody_FX
Offline
Regular Contributor
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
Reply With Quote

#4 Old 2003-12-01, 10:07

Join Date: Jul 2003
Posts: 1,094
Location: Finland, Tampere
doctordwarf
Offline
Super Contributor
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 :)
Reply With Quote

#5 Old 2003-12-02, 12:04

Join Date: Jun 2003
Posts: 414
Location: Hungary
kisember
Offline
just a baker
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 With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia