Shop OBEX P1 Docs P2 Docs Learn Events
Using Mouse.spin Bound_Scales, etc. — Parallax Forums

Using Mouse.spin Bound_Scales, etc.

coryco2coryco2 Posts: 107
edited 2012-05-22 19:46 in Propeller 1

Has anyone seen or could offer an explanation of the bound_scales, bound_limits, bound_preset, etc. methods in the Mouse.spin object? (i.e. what they are and how to use, etc.)

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2012-05-22 18:16
    There is not much to it. bound_limits effectively limits the range for the returned mouse coordinates (z is for scroll-wheel) min/max style. bound_scale affects direction and speed. As the sparse comment suggests, higher values result in smaller changes. Finally, bound_preset sets the initial values returned by the bound_? methods, e.g. you can place the mouse initially in the middle of the screen. Most VGA demos provided with the PropTool use at least limits and scale methods. HTH
  • coryco2coryco2 Posts: 107
    edited 2012-05-22 18:29
    Ok. I added the methods to the Test Parallax Mouse code and see how it works now. But those methods apparently only apply when used with mouse.bound_x, mouse.bound_y, etc. though, and not with the mouse.delta's? Are there any objects out there (or modifications that could be made to this driver) that would allow you to tweak/scale mouse delta values' sensitivity and ranges?
  • kuronekokuroneko Posts: 3,623
    edited 2012-05-22 18:38
    bound_x is - for want of a better word - the processed version of delta_x. Is that not sufficent?
  • coryco2coryco2 Posts: 107
    edited 2012-05-22 19:46
    Well, for some uses, I suppose. But the value of bound_x doesn't seem to return the delta itself anymore, but instead the sum of the delta and the previous value of bound_x (within the various parameters of limits, scale and preset). It'd be nice to have limits, scale and preset methods that would apply directly to the delta value in the same way. I suppose those are easy enough to implement, though (using operators to apply max limits to the delta values, etc).

    I wonder if there would be ways to use the mouse itself to adjust some these parameters? Seems like there are some serial commands that could be sent to the mouse to set data parameters, aren't there?
Sign In or Register to comment.