You Are Here:

Community: Developer Discussion Boards

#1 Old Determining when FIRE is assigned a soft menu - 2006-08-28, 08:00

Join Date: Aug 2006
Posts: 6
cdsmith
Offline
Registered User
While recently testing a game I've written on the Series 40 3rd Edition emulator, I noticed that the emulator assigns the same key used in GameCanvas.FIRE_PRESSED to a soft menu. This is a serious problem for me, as I have a soft menu but also use the FIRE key for other purposes. I could work around it by disabling the FIRE key, if I could discover that the FIRE key is assigned to a soft menu item. Any good way of doing that?
Reply With Quote

#2 Old Re: Determining when FIRE is assigned a soft menu - 2006-08-28, 09:20

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
It relies on the Nokia UI classes, but:
Code:
if (getKeyCode(FIRE) == FullCanvas.KEY_SOFTKEY1) // or KEY_SOFTKEY2 or 3
A small problem is that getKeyCode() will only return one out of possibly many options for the FIRE game action, but that would also mean the user has another way of triggering that event (like pressing 5 instead of the middle softkey). You'd have to decide if that's acceptable.

I have a 6280 and I've noticed quite a few games that have that problem, and you have to use 5 to fire.

shmoove
Reply With Quote

#3 Old Re: Determining when FIRE is assigned a soft menu - 2006-08-28, 23:31

Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
peterblazejewicz
Offline
Super Contributor
hi shmoove,

that probably would not help, at least while testing on emulator high-level menu command always override FIRE button and if cdsmith has menus items their listener will be fired
@cdsmith
can you simply use full screen canvas without any labels for menu or add one or two labels (positive/negative) and trap key events for negative values? that way FIRE could be still used,

regards,
Peter
Reply With Quote

#4 Old Re: Determining when FIRE is assigned a soft menu - 2006-08-29, 08:38

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
Quote:
Originally Posted by peterblazejewicz
that probably would not help, at least while testing on emulator high-level menu command always override FIRE button and if cdsmith has menus items their listener will be fired
That code isn't something to put in keyPressed() to check if FIRE is pressed. It's something to put in the initialization of the class, to discover if a softkey could override the FIRE key, and take appropiate measures accordingly. So I don't see how Commands overriding the FIRE button would affect it. Am I missing something?

shmoove
Reply With Quote

#5 Old Re: Determining when FIRE is assigned a soft menu - 2006-08-29, 23:34

Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
peterblazejewicz
Offline
Super Contributor
hi shmoove,

oh, ok, bear with me - i'm learning,
so it also should be possible (to detect S40 platform) to use unique property:
Code:
public static boolean IS_S40;
    public TestMidlet(){
        IS_S40 = (getAppProperty("com.nokia.mid.timeformat") != null);
    }
I guess,
however both does not work in my S40 emulator and I don't own S40 device yet for tests,

regards,
Peter
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
Similar Threads
Thread Thread Starter Forum Replies Last Post
How to desactivate the Menu Key ?... GeKI Symbian User Interface 3 2007-10-22 11:02
the way Nokia Series 40 handles predefined soft menu in WML cards jevgen General Browsing 0 2005-10-17 10:39
CBA, menu and key events joker_pl Symbian User Interface 1 2005-09-19 11:27
Menu bar in FEP kdinn General Symbian C++ 0 2004-05-27 09:07
Menu Select button using List object abstractworlds Mobile Java General 4 2002-12-09 14:08

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 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d127641X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZgamesQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ