×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Regular Contributor
    Join Date
    Oct 2004
    Location
    india
    Posts
    306

    key handling!!!!!!!!!!!!!!

    hi,

    im facing a problem with key events.
    in my game when i hold a key event has to occur only once.

    i.e., when i press up key ball has to jump and come back to its positio but wat happens is when i hold the key its move up and up..

    how to handle such problem

    in my game im using DSA ...

  2. #2
    Registered User
    Join Date
    Jul 2004
    Posts
    38
    Hi

    Are you sure that you are giving the ball a negative velocity after the key is released.
    You cud do that in the EEventKeyUp of your OfferKeyEvent.
    Also, Could you post your OfferKeyEvent function, so I could take a look at it.

    By the way, what's DSA.

    Best of Luck

  3. #3
    Regular Contributor
    Join Date
    Mar 2003
    Location
    Tampere
    Posts
    475

    Key Repeats

    TKeyResponse CNoRepeatGame::OfferKeyEventL(
    const TKeyEvent& aKeyEvent,
    TEventCode aType )
    {
    ...
    if (aType == EEventKeyDown && aKeyEvent.iRepeats == 0)
    {
    // Jump();
    } else ; // when key is hold aKeyEvent.iRepeats =1
    ...

    Best Regards,
    (V) - Forum Nokia Developer Support

  4. #4
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    Originally posted by kurtrips
    By the way, what's DSA.
    DSA = Direct Screen Access

    Quite useful stuff for quick graphics. Introduced in symbian 7.0 and then back-ported to 6.1

Posting Permissions

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