×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    89

    How to tell from vertically and horizontally in event "onPositionChanged?

    I have a rectangle which could by moved vertically and horizontally by finger.

    So in event "onPositionChanged", how could I tell the intend is vertically or horizontally.

    I remembered that there is a common algorithm/standard, but can't remembered.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to tell from vertically and horizontally in event "onPositionChanged?

    Comparing the components and ignoring the smaller one? (Of course compare absolute values)

  3. #3
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    89

    Re: How to tell from vertically and horizontally in event "onPositionChanged?

    Sorry, what means "components"?

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,689

    Re: How to tell from vertically and horizontally in event "onPositionChanged?

    deltaX and deltaY...

  5. #5
    Regular Contributor
    Join Date
    Apr 2011
    Posts
    89

    Re: How to tell from vertically and horizontally in event "onPositionChanged?

    Thanks. I am using that deltaX and deltaY in my way, not ideal. Can you be more detail about yours?

    Just get tips from the snake game. Not try yet.
    http://doc.qt.nokia.com/4.7/demos-de...ive-snake.html
    Last edited by useryy2; 2011-08-16 at 11:37.

Similar Threads

  1. how to scroll an image vertically and horizontally both in LWUIT
    By Manish_Bansal in forum Mobile Java General
    Replies: 1
    Last Post: 2010-07-13, 02:39
  2. Replies: 1
    Last Post: 2009-12-08, 04:04
  3. How to show imageitem in List horizontally
    By atiqe in forum Mobile Java General
    Replies: 2
    Last Post: 2007-06-06, 20:24
  4. Replies: 2
    Last Post: 2006-01-17, 04:44
  5. Replies: 0
    Last Post: 2004-06-03, 03:02

Posting Permissions

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