- replace "view-cycle" fgcommand by view.stepView() wrapper
(This fgcommand was broken for a few weeks. Now it's fixed, but the wrapper use is desirable, as this allows easy redefining.) - cyborg gold: cosmetics
This commit is contained in:
parent
39ee6cff4f
commit
eab53706ba
8 changed files with 30 additions and 24 deletions
|
@ -143,8 +143,8 @@ $Id$
|
||||||
<desc>View Cycle</desc>
|
<desc>View Cycle</desc>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>view-cycle</command>
|
<command>nasal</command>
|
||||||
<step type="double">1</step>
|
<script>view.stepView(1)</script>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,8 @@
|
||||||
<desc>Cycle View</desc>
|
<desc>Cycle View</desc>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>view-cycle</command>
|
<command>nasal</command>
|
||||||
|
<script>view.stepView(1)</script>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
|
@ -208,7 +208,8 @@ $Id$
|
||||||
<desc>Cycle View</desc>
|
<desc>Cycle View</desc>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>view-cycle</command>
|
<command>nasal</command>
|
||||||
|
<script>view.stepView(1)</script>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
|
@ -93,8 +93,8 @@ $Id$
|
||||||
<desc>View Cycle</desc>
|
<desc>View Cycle</desc>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>view-cycle</command>
|
<command>nasal</command>
|
||||||
<step type="double">1</step>
|
<script>view.stepView(1)</script>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
|
@ -93,7 +93,8 @@
|
||||||
<button n="1">
|
<button n="1">
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>view-cycle</command>
|
<command>nasal</command>
|
||||||
|
<script>view.stepView(1)</script>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
<button n="2">
|
<button n="2">
|
||||||
|
|
|
@ -166,10 +166,11 @@ $Id$
|
||||||
|
|
||||||
|
|
||||||
<button n="1">
|
<button n="1">
|
||||||
<desc>view-cycle</desc>
|
<desc>Cycle view</desc>
|
||||||
<repeatable>false</repeatable>
|
<repeatable>false</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>view-cycle</command>
|
<command>nasal</command>
|
||||||
|
<script>view.stepView(1)</script>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
|
@ -131,8 +131,8 @@ $Id$
|
||||||
<desc>External Views</desc>
|
<desc>External Views</desc>
|
||||||
<repeatable type="bool">false</repeatable>
|
<repeatable type="bool">false</repeatable>
|
||||||
<binding>
|
<binding>
|
||||||
<command>view-cycle</command>
|
<command>nasal</command>
|
||||||
<step type="double">1</step>
|
<script>view.stepView(1)</script>
|
||||||
</binding>
|
</binding>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
|
@ -112,26 +112,28 @@ ________________________________________________________________________________
|
||||||
|
|
||||||
<nasal>
|
<nasal>
|
||||||
<script><![CDATA[
|
<script><![CDATA[
|
||||||
self = cmdarg().getParent();
|
var self = cmdarg().getParent();
|
||||||
data = self.getNode("data");
|
var data = self.getNode("data");
|
||||||
mode = data.getNode("mode");
|
var mode = data.getNode("mode");
|
||||||
modifier = data.getNode("modifier");
|
var modifier = data.getNode("modifier");
|
||||||
f1 = f2 = 0;
|
var f1 = 0;
|
||||||
left_brake = right_brake = 0;
|
var f2 = 0;
|
||||||
trigger = 0;
|
var left_brake = 0;
|
||||||
|
var right_brake = 0;
|
||||||
|
var trigger = 0;
|
||||||
|
|
||||||
if (props.globals.getNode("/rotors", 0) != nil) {
|
if (props.globals.getNode("/rotors", 0) != nil) {
|
||||||
self.getNode("axis[0]/binding/power").setIntValue(1);
|
self.getNode("axis[0]/binding/power").setIntValue(1);
|
||||||
self.getNode("axis[1]/binding/power").setIntValue(1);
|
self.getNode("axis[1]/binding/power").setIntValue(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
kbdshift = props.globals.getNode("/devices/status/keyboard/shift", 1);
|
var kbdshift = props.globals.getNode("/devices/status/keyboard/shift", 1);
|
||||||
kbdctrl = props.globals.getNode("/devices/status/keyboard/ctrl", 1);
|
var kbdctrl = props.globals.getNode("/devices/status/keyboard/ctrl", 1);
|
||||||
kbdalt = props.globals.getNode("/devices/status/keyboard/alt", 1);
|
var kbdalt = props.globals.getNode("/devices/status/keyboard/alt", 1);
|
||||||
|
|
||||||
get_mode = func { modifier.getValue() + mode.getValue() * 4 }
|
var get_mode = func { modifier.getValue() + mode.getValue() * 4 }
|
||||||
|
|
||||||
harrier = func {
|
var harrier = func {
|
||||||
if (getprop("/sim/aero") == "harrier") {
|
if (getprop("/sim/aero") == "harrier") {
|
||||||
thv = getprop("/controls/engines/engine[0]/mixture");
|
thv = getprop("/controls/engines/engine[0]/mixture");
|
||||||
gui.popupTip("Thrust vector " ~ int(thv * 120 - 20 + 0.5));
|
gui.popupTip("Thrust vector " ~ int(thv * 120 - 20 + 0.5));
|
||||||
|
@ -296,7 +298,7 @@ ________________________________________________________________________________
|
||||||
} elsif (m == 1) {
|
} elsif (m == 1) {
|
||||||
i = !getprop("/controls/gear/tailwheel-lock");
|
i = !getprop("/controls/gear/tailwheel-lock");
|
||||||
setprop("/controls/gear/tailwheel-lock", i);
|
setprop("/controls/gear/tailwheel-lock", i);
|
||||||
gui.popupTip("Tail Wheel " ~ ["UNLOCKED", "LOCKED"][i]);
|
gui.popupTip("Tail Wheel " ~ (i ? "LOCKED" : "UNLOCKED"));
|
||||||
} elsif (m == 2) {
|
} elsif (m == 2) {
|
||||||
setprop("/sim/current-view/view-number", 0);
|
setprop("/sim/current-view/view-number", 0);
|
||||||
view.resetView();
|
view.resetView();
|
||||||
|
|
Loading…
Add table
Reference in a new issue