diff --git a/Nasal/controls.nas b/Nasal/controls.nas index b2c908126..a7deac4b8 100644 --- a/Nasal/controls.nas +++ b/Nasal/controls.nas @@ -734,3 +734,14 @@ var cycleMouseMode = func(node) } addcommand("cycle-mouse-mode", cycleMouseMode); + +var setMouseFlightControlsSensitivity = func(sensitivity) +{ + setprop("/input/mice/mouse/mode[1]/y-axis/binding[0]/factor", -sensitivity); + setprop("/input/mice/mouse/mode[1]/x-axis/binding[0]/factor", sensitivity); + setprop("/input/mice/mouse/mode[1]/x-axis/binding[1]/factor", sensitivity); +} + +setlistener("/sim/mouse/flight-controls-sensitivity", func(prop){ + setMouseFlightControlsSensitivity(prop.getValue()) +}, 1, 0); diff --git a/defaults.xml b/defaults.xml index 751884ea7..872a33032 100644 --- a/defaults.xml +++ b/defaults.xml @@ -735,6 +735,7 @@ Started September 2000 by David Megginson, david@megginson.com 1.0 false false + 4.0 false diff --git a/gui/dialogs/input-config.xml b/gui/dialogs/input-config.xml index 4903100b7..5d4b1cc60 100644 --- a/gui/dialogs/input-config.xml +++ b/gui/dialogs/input-config.xml @@ -172,9 +172,36 @@ 1 + + left + + 1 + 1 + + + left + 0.1 + 4.0 + 0.1 + /sim/mouse/flight-controls-sensitivity + + dialog-apply + + 1 + 2 + + + left + %1.1f + /sim/mouse/flight-controls-sensitivity + true + 1 + 3 + + - 1 + 2 0 left