Shop OBEX P1 Docs P2 Docs Learn Events
Mouse object- mouse speed — Parallax Forums

Mouse object- mouse speed

JonathanJonathan Posts: 1,023
edited 2008-04-22 17:12 in Propeller 1
Hi All,

PLaying with the mouse object, the cursor moves very slowly. Is this the limitiation of the hardware/software, or can I speed it up somehow?

Thanks!

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
www.madlabs.info - Home of the Hydrogen Fuel Cell Robot

Comments

  • Graham StablerGraham Stabler Posts: 2,507
    edited 2008-04-22 15:56
    the returned value from the mouse could be scaled to provide faster response

    Graham
  • JonathanJonathan Posts: 1,023
    edited 2008-04-22 16:29
    Graham,

    Remember I'm a thickie. I tied adding to the return value, I get a blurred/shifting cursor, but it moves at the same speed. Any hints, in small words, of where/how to this scaling?

    Thanks!

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-04-22 16:40
    OBJ

    mouse : "Mouse"

    PUB start

    ...

    x += mouse.delta_x << 1
    y += mouse.delta_y << 1
    ...



    This will speed up the mouse 2:1

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔


    Post Edited (Ken Peterson) : 4/22/2008 4:45:33 PM GMT
  • JonathanJonathan Posts: 1,023
    edited 2008-04-22 16:46
    Ken,

    Great! Now, where exactly do I need to use your snip? I am using the "VGA_1280x1024_Tile_Driver_With_Cursor", and am trying to modify the demo file that came with it. Sorry I'm so thick.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • JonathanJonathan Posts: 1,023
    edited 2008-04-22 16:55
    I did get it to work, but the cursor now goes out of the bounds.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    www.madlabs.info - Home of the Hydrogen Fuel Cell Robot
  • Ken PetersonKen Peterson Posts: 806
    edited 2008-04-22 17:12
    How about this?

    x += mouse.delta_x << 1 #> lower_x_limit <# upper_x_limit
    y += mouse.delta_y << 1 #> lower_y_limit <# upper_y_limit

    your limits can be constants

    I think the mouse object has functions to set bounds and scaling, but I'm not sure how they work.· My only experience with the mouse object is from playing around with the graphics object.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sign In or Register to comment.