1
0
Fork 0
fgdata/Input/Joysticks/ThrustMaster/Warthog/Throttle/harrier.xml
Melchior FRANZ a6c2cfa172 warthog: add first aircraft specific overlay file
These files take complexity out of the main joystick file, while
not adding much code. They also update the description (<desc>)
used by the Help->Joystick information dialog. All <nasal> code
is executed in the joystick's namespace, so variables and funtions
of the main file (popup()) can be accessed.
2011-09-11 14:33:11 +02:00

35 lines
683 B
XML

<?xml version="1.0"?>
<!-- left throttle: control thrust vector -->
<PropertyList>
<nasal>
<script>
var thrust_display = func {
var thv = getprop("/controls/engines/engine[0]/mixture");
popup("Thrust vector " ~ int(thv * 120 - 20 + 0.5));
}
</script>
</nasal>
<axis n="2">
<name>Right Throttle</name>
<desc>throttle</desc>
<binding>
<command>nasal</command>
<script>controls.throttleAxis()</script>
</binding>
</axis>
<axis n="3">
<name>Left Throttle</name>
<desc>thrust vector</desc>
<binding>
<command>nasal</command>
<script>
controls.mixtureAxis();
thrust_display();
</script>
</binding>
</axis>
</PropertyList>