×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    4

    Problems with menu

    Hi,

    I'm doing an app, and I want to use full screen e put some commands that are trigered by softkeys.

    Since I want full screen, commands that I add do not show in screen, so I draw images in the left and right corner. Problem is, when using full screen, commands are placed only in one menu, so only one softkey can be used. When used without full screen commands are placed in right place, and each one can be accessed by a soft key.

    So, I'm trying to not use "Command", but the problem is that softkeys change in different phones, is there anyway I can map them to work in all phones, or use fullscreen and be able to use "Command" with both softkey?

    any sugestions?

    thanks

    best regards

  2. #2
    Registered User
    Join Date
    Jan 2006
    Location
    Santiago, Chile
    Posts
    8

    Re: Problems with menu

    Hi,

    In order to get your application to work properly in more devices, you should use the keyPressed(int keycode) method in your canvas.

    This keycode may be different in every phone, but in order to solve this problem you can try different models/brands and store the game actions for the key codes. Then, you can compare if the current keycodes maps to any known game actions and then you can act according to that.

    For instance, left button in most of the devices is represented with keyCode=-6 and right button with keyCode=-7. In these devices, if you get the game action for these values you always get 0. Therefore if you receive any non zero value for getGameAction(-6) or getGameAction(-7), then you are running a different valued keyCode set. In that case you have to compare those values with any other keyCode set you have.

    For instance, in the Motorola V3, the left button is mapped to keyCode=-21 and the right button to keyCode=-22. In this case, getGameAction(-6) returns Canvas.DOWN instead of zero.
    Therefore here you would just have to set the "left keycode" to -21 instead of -6 and the "right keycode" to -22 instead of -7.

    The more different keycode sets you can store, the more devices will work properly using your app.

    These are the values of the constants in Canvas for reference:

    Down: 6 Up: 1 Left: 2 Right: 5 Fire: 8 Game A: 9 Game B: 10 Game C: 11 Game D: 12

    Best Regards,
    Sebastian Montabone

Similar Threads

  1. How to desactivate the Menu Key ?...
    By GeKI in forum Symbian User Interface
    Replies: 3
    Last Post: 2007-10-22, 10:02
  2. CEikEdwin in CAknDialog (Text Menu)
    By grapentin in forum Symbian User Interface
    Replies: 0
    Last Post: 2007-03-22, 09:47
  3. Replies: 0
    Last Post: 2007-03-13, 07:02
  4. Cascading menu
    By deepthis in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2006-07-18, 05:33
  5. Menu problems
    By SevenOfEleven in forum Mobile Java General
    Replies: 2
    Last Post: 2005-12-13, 00:39

Posting Permissions

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