1
0
Fork 0

controls.startEngine: allow selection of engine(s)

This commit is contained in:
Torsten Dreyer 2011-01-01 10:35:15 +01:00
parent 8ed16a4de2
commit 819d7ab811

View file

@ -1,9 +1,16 @@
var startEngine = func(v = 1) {
if (!v)
var startEngine = func(v = 1, which...) {
if (!v and !size(which))
return props.setAll("/controls/engines/engine", "starter", 0);
foreach(var e; engines)
if(e.selected.getValue())
e.controls.getNode("starter").setBoolValue(v);
if(size(which)) {
foreach(var i; which)
foreach(var e; engines)
if(e.index == i)
e.controls.getNode("starter").setBoolValue(v);
} else {
foreach(var e; engines)
if(e.selected.getValue())
e.controls.getNode("starter").setBoolValue(v);
}
}
var selectEngine = func(which) {