From 7cc31829a3aec37d0a23f0c5c32d84cd37105524 Mon Sep 17 00:00:00 2001 From: mfranz Date: Thu, 16 Jun 2005 07:36:54 +0000 Subject: [PATCH] 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 --- Nasal/controls.nas | 1 + keyboard.xml | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Nasal/controls.nas b/Nasal/controls.nas index e8b8e864b..246d22e45 100644 --- a/Nasal/controls.nas +++ b/Nasal/controls.nas @@ -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]); } diff --git a/keyboard.xml b/keyboard.xml index 057626b62..ae5fe3a2b 100644 --- a/keyboard.xml +++ b/keyboard.xml @@ -532,9 +532,8 @@ calculated by adding 256 to the GLUT key value in glut.h. G Gear down. - property-assign - /controls/gear/gear-down - 1.0 + nasal + @@ -700,9 +699,8 @@ calculated by adding 256 to the GLUT key value in glut.h. g Gear Up. - property-assign - /controls/gear/gear-down - 0.0 + nasal +