From a6c2cfa172db0a0c6072fbee96b616f1f4ffcc4e Mon Sep 17 00:00:00 2001 From: Melchior FRANZ Date: Sun, 11 Sep 2011 08:52:04 +0200 Subject: [PATCH] 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 () used by the Help->Joystick information dialog. All code is executed in the joystick's namespace, so variables and funtions of the main file (popup()) can be accessed. --- .../Joysticks/ThrustMaster/Warthog-Stick.xml | 18 +++++----- .../ThrustMaster/Warthog-Throttle.xml | 18 +++++----- .../ThrustMaster/Warthog/Throttle/harrier.xml | 35 +++++++++++++++++++ 3 files changed, 53 insertions(+), 18 deletions(-) create mode 100644 Input/Joysticks/ThrustMaster/Warthog/Throttle/harrier.xml diff --git a/Input/Joysticks/ThrustMaster/Warthog-Stick.xml b/Input/Joysticks/ThrustMaster/Warthog-Stick.xml index 7cc8db36d..416f43c6f 100644 --- a/Input/Joysticks/ThrustMaster/Warthog-Stick.xml +++ b/Input/Joysticks/ThrustMaster/Warthog-Stick.xml @@ -27,11 +27,6 @@ } } - load_overlay("generic.xml"); - if (is_helicopter) - load_overlay("helicopter.xml"); - load_overlay(getprop("/sim/aircraft") ~ ".xml"); - foreach (var b; this.getChildren("button")) { if (b.getAttribute("children") == 1) { var name = b.getNode("name", 1).getValue() or "??"; @@ -44,13 +39,18 @@ setlistener(_, func(n) mod = n.getValue()); var trimstep = 0.75; + + load_overlay("generic.xml"); + if (is_helicopter) + load_overlay("helicopter.xml"); + load_overlay(getprop("/sim/aircraft") ~ ".xml"); X-axis aileron - 0.0001 + 0.00001 property-scale /controls/flight/aileron @@ -60,7 +60,7 @@ Y-axis elevator - 0.0001 + 0.00001 property-scale /controls/flight/elevator @@ -127,7 +127,7 @@