add one level of indirection for gear down/up and use that in all bindings,
so that aircraft with special requirements (hurricane) can simply redefine controls.gearDown() without breaking all joystick setups
This commit is contained in:
parent
941ec7e624
commit
7cc31829a3
2 changed files with 5 additions and 6 deletions
|
@ -314,3 +314,4 @@ elevatorTrimAxis = func { elevatorTrim(cmdarg().getNode("value").getValue()); }
|
||||||
aileronTrimAxis = func { aileronTrim(cmdarg().getNode("value").getValue()); }
|
aileronTrimAxis = func { aileronTrim(cmdarg().getNode("value").getValue()); }
|
||||||
rudderTrimAxis = func { rudderTrim(cmdarg().getNode("value").getValue()); }
|
rudderTrimAxis = func { rudderTrim(cmdarg().getNode("value").getValue()); }
|
||||||
|
|
||||||
|
gearDown = func { setprop("/controls/gear/gear-down", arg[0]); }
|
||||||
|
|
10
keyboard.xml
10
keyboard.xml
|
@ -532,9 +532,8 @@ calculated by adding 256 to the GLUT key value in glut.h.
|
||||||
<name>G</name>
|
<name>G</name>
|
||||||
<desc>Gear down.</desc>
|
<desc>Gear down.</desc>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-assign</command>
|
<command>nasal</command>
|
||||||
<property>/controls/gear/gear-down</property>
|
<script>controls.gearDown(1.0)</script>
|
||||||
<value type="double">1.0</value>
|
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
|
@ -700,9 +699,8 @@ calculated by adding 256 to the GLUT key value in glut.h.
|
||||||
<name>g</name>
|
<name>g</name>
|
||||||
<desc>Gear Up.</desc>
|
<desc>Gear Up.</desc>
|
||||||
<binding>
|
<binding>
|
||||||
<command>property-assign</command>
|
<command>nasal</command>
|
||||||
<property>/controls/gear/gear-down</property>
|
<script>controls.gearDown(0.0)</script>
|
||||||
<value type="double">0.0</value>
|
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue