From d300b92b9dc09d839c0ae0b74e81b9395b5f854b Mon Sep 17 00:00:00 2001 From: Melchior FRANZ Date: Thu, 22 Sep 2011 23:01:01 +0200 Subject: [PATCH 1/2] warthog: gear; swap DMS/TMS (again); time based view reset --- .../ThrustMaster/Warthog/Warthog-Stick.xml | 159 ++++++++++-------- .../ThrustMaster/Warthog/Warthog-Throttle.xml | 19 ++- 2 files changed, 107 insertions(+), 71 deletions(-) diff --git a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml index c589a5a29..0ab91c505 100644 --- a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml +++ b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Stick.xml @@ -18,7 +18,7 @@ var this = cmdarg().getParent(); var init = !contains(caller(0)[0], "init"); var popup = func gui.popupTip(call(sprintf, arg)); - var is_helicopter = (var _ = props.globals.getNode("rotors", 0)) != nil and _.getAttribute("children"); + var is_helicopter = (func {(var n = props.globals.getNode("rotors", 0)) != nil and n.getAttribute("children")})(); var aircraft_type = getprop("/sim/type"); var overlay = getprop("/input/joysticks/overlay"); @@ -44,12 +44,13 @@ var mod = 0; if (init) { - var _ = props.globals.initNode("/devices/status/joysticks/warthog/modifier", mod, "INT"); - setlistener(_, func(n) mod = n.getValue()); + var n = props.globals.initNode("/devices/status/joysticks/warthog/modifier", mod, "INT"); + setlistener(n, func(n) mod = n.getValue()); } var trimstep = 0.75; var viewstep = 0.5; + var button = { 18: { id: 0 }}; var reset_zoom = func setprop("/sim/current-view/field-of-view", 55); var viewdir = props.globals.getNode("/sim").getChildren("view"); @@ -199,55 +200,7 @@ - - - - - - - - - - - + + + + + + + + diff --git a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Throttle.xml b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Throttle.xml index 79dc23f2f..dd00d33d9 100644 --- a/Input/Joysticks/ThrustMaster/Warthog/Warthog-Throttle.xml +++ b/Input/Joysticks/ThrustMaster/Warthog/Warthog-Throttle.xml @@ -14,7 +14,7 @@ var this = cmdarg().getParent(); var init = !contains(caller(0)[0], "init"); var popup = func gui.popupTip(call(sprintf, arg)); - var is_helicopter = (var _ = props.globals.getNode("rotors", 0)) != nil and _.getAttribute("children"); + var is_helicopter = (func {(var n = props.globals.getNode("rotors", 0)) != nil and n.getAttribute("children")})(); var aircraft_type = getprop("/sim/type"); var overlay = getprop("/input/joysticks/overlay"); @@ -40,8 +40,8 @@ var mod = 0; if (init) { - var _ = props.globals.initNode("/devices/status/joysticks/warthog/modifier", mod, "INT"); - setlistener(_, func(n) mod = n.getValue()); + var n = props.globals.initNode("/devices/status/joysticks/warthog/modifier", mod, "INT"); + setlistener(n, func(n) mod = n.getValue()); } var left_engines = [0, 2, 4, 6, 8, 10]; @@ -328,7 +328,18 @@ + + + + + + + + + + + + + + + + + + + + + +