Erik Hofman writes:
>
>David Megginson wrote:
>.
>> 
>> What does everyone else prefer -- should the mouse get stuck on the
>> window edges in constrained mode, or should it wrap around?  
>I have no
>> strong preference either way.  There are good arguments in favour of
>> both: with wrap-around, you still see cursor movement while you're
>> moving the mouse, so you get good relative feedback, and the same
>> amount of movement will bring it back to the center again; with the
>> cursor stuck at the edges, you're less likely to loose track of it.
>
>Well, I definately don't want the previous behaviour back (concerning 
>the borders) as it were before you created the new mouse code.
>
>This big problem there was that when the cursor wrapped around the 
>screen, the flaps were positioned to the maximum oposite position, which 
>gave a sudden flap change from about +75% to -100% at once!
>
>That's why i like your approach better, the position gets 
>adjusted as if it were within the borders.

Hmm.  good point I guess I never tried giving that much 'stick'
with the old mouse.  but this should be an easy fix

try using this code for the MOUSE_YOKE case in 
GUI / mouse.cxx :: guiMotionFunc()

Cheers

Norman

=== cut ===

      case MOUSE_YOKE:
        if( !mouse_joystick_control ) {
          mouse_joystick_control = 1;
          fgSetString("/sim/control-mode", "mouse");
        } else {
          if( y <= 0 ) {
            y = 1;
            need_warp = 1;
          } else if( y >= wh-1) {
            y = wh-2;
            need_warp = 1;
          }
          if ( x <= 0 ) {
            x = 1;
            need_warp = 1;
          } else if ( x >= ww-1 ) {
            x = ww-2;
            need_warp = 1;
          }
          if ( left_button() ) {
            move_brake(   (_mX - x) * brake_sensitivity);
            move_throttle((_mY - y) * throttle_sensitivity);
          } else if ( right_button() ) {
            if( ! AP_HeadingEnabled() ) {
              move_rudder((x - _mX) * rudder_sensitivity);
            }
            if( ! AP_AltitudeEnabled() ) {
              move_elevator_trim((_mY - y) * trim_sensitivity);
            }
          } else {
            if( ! AP_HeadingEnabled() ) {
              move_aileron((x - _mX) * aileron_sensitivity);
            }
            if( ! AP_AltitudeEnabled() ) {
              move_elevator((_mY - y) * elevator_sensitivity);
            }
          }
        }
        break;

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to