1
0
Fork 0

Mouse: setting for flight controls sensitivitiy.

This commit is contained in:
Michael Danilov 2020-12-07 19:21:56 +01:00 committed by Fernando García Liñán
parent 00b465b84f
commit 1052addd23
3 changed files with 40 additions and 1 deletions

View file

@ -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);

View file

@ -735,6 +735,7 @@ Started September 2000 by David Megginson, david@megginson.com
<drag-sensitivity type="double" userarchive="y">1.0</drag-sensitivity>
<invert-mouse-wheel type="bool" userarchive="y">false</invert-mouse-wheel>
<skip-flight-controls-mode type="bool" userarchive="y">false</skip-flight-controls-mode>
<flight-controls-sensitivity type="double" userarchive="y">4.0</flight-controls-sensitivity>
<mouse-rudder-elevator type="bool" userarchive="y">false</mouse-rudder-elevator>
</mouse>
<replay>

View file

@ -172,9 +172,36 @@
<col>1</col>
</checkbox>
<text>
<halign>left</halign>
<label>Flight controls sensitivity</label>
<row>1</row>
<col>1</col>
</text>
<slider>
<halign>left</halign>
<min>0.1</min>
<max>4.0</max>
<step>0.1</step>
<property>/sim/mouse/flight-controls-sensitivity</property>
<binding>
<command>dialog-apply</command>
</binding>
<row>1</row>
<col>2</col>
</slider>
<text>
<halign>left</halign>
<format>%1.1f</format>
<property>/sim/mouse/flight-controls-sensitivity</property>
<live>true</live>
<row>1</row>
<col>3</col>
</text>
<!-- empty line before next -->
<text>
<row>1</row>
<row>2</row>
<col>0</col>
<label> </label>
<halign>left</halign>