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()); }
|
||||
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>
|
||||
<desc>Gear down.</desc>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>/controls/gear/gear-down</property>
|
||||
<value type="double">1.0</value>
|
||||
<command>nasal</command>
|
||||
<script>controls.gearDown(1.0)</script>
|
||||
</binding>
|
||||
</key>
|
||||
|
||||
|
@ -700,9 +699,8 @@ calculated by adding 256 to the GLUT key value in glut.h.
|
|||
<name>g</name>
|
||||
<desc>Gear Up.</desc>
|
||||
<binding>
|
||||
<command>property-assign</command>
|
||||
<property>/controls/gear/gear-down</property>
|
||||
<value type="double">0.0</value>
|
||||
<command>nasal</command>
|
||||
<script>controls.gearDown(0.0)</script>
|
||||
</binding>
|
||||
</key>
|
||||
|
||||
|
|
Loading…
Reference in a new issue