controles de vol par la souris si le joystick n'est...
...pas branché
... | ... |
@@ -26,6 +26,16 @@ modified by zakharov |
26 | 26 |
<PropertyList> |
27 | 27 |
<nasal> |
28 | 28 |
<script><![CDATA[ |
29 |
+ var skipFlightControls = props.globals.getNode("/sim/mouse/skip-flight-controls-mode"); |
|
30 |
+ setlistener("/sim/signals/fdm-initilized", func { |
|
31 |
+ skipFlightControls.setBoolValue(1); |
|
32 |
+ print("JOYSTICK set mouse flight control OFF: ", skipFlightControls.getValue()); |
|
33 |
+ }, 1 ); |
|
34 |
+ setlistener("/sim/signals/save", func { |
|
35 |
+ skipFlightControls.setBoolValue(0); |
|
36 |
+ print("JOYSTICK save mouse flight control ON: ", skipFlightControls.getValue()); |
|
37 |
+ } ); |
|
38 |
+ |
|
29 | 39 |
var shift = props.globals.getNode("/devices/status/keyboard/shift"); |
30 | 40 |
var ctrl = props.globals.getNode("/devices/status/keyboard/ctrl"); |
31 | 41 |
var alt = props.globals.getNode("/devices/status/keyboard/alt"); |