- 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>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>view-cycle</command>
|
||||
<step type="double">1</step>
|
||||
<command>nasal</command>
|
||||
<script>view.stepView(1)</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
|
|
@ -142,7 +142,8 @@
|
|||
<desc>Cycle View</desc>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>view-cycle</command>
|
||||
<command>nasal</command>
|
||||
<script>view.stepView(1)</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
|
|
@ -208,7 +208,8 @@ $Id$
|
|||
<desc>Cycle View</desc>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>view-cycle</command>
|
||||
<command>nasal</command>
|
||||
<script>view.stepView(1)</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
|
|
@ -93,8 +93,8 @@ $Id$
|
|||
<desc>View Cycle</desc>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>view-cycle</command>
|
||||
<step type="double">1</step>
|
||||
<command>nasal</command>
|
||||
<script>view.stepView(1)</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
|
|
@ -93,7 +93,8 @@
|
|||
<button n="1">
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>view-cycle</command>
|
||||
<command>nasal</command>
|
||||
<script>view.stepView(1)</script>
|
||||
</binding>
|
||||
</button>
|
||||
<button n="2">
|
||||
|
|
|
@ -166,10 +166,11 @@ $Id$
|
|||
|
||||
|
||||
<button n="1">
|
||||
<desc>view-cycle</desc>
|
||||
<desc>Cycle view</desc>
|
||||
<repeatable>false</repeatable>
|
||||
<binding>
|
||||
<command>view-cycle</command>
|
||||
<command>nasal</command>
|
||||
<script>view.stepView(1)</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
|
|
@ -131,8 +131,8 @@ $Id$
|
|||
<desc>External Views</desc>
|
||||
<repeatable type="bool">false</repeatable>
|
||||
<binding>
|
||||
<command>view-cycle</command>
|
||||
<step type="double">1</step>
|
||||
<command>nasal</command>
|
||||
<script>view.stepView(1)</script>
|
||||
</binding>
|
||||
</button>
|
||||
|
||||
|
|
|
@ -112,26 +112,28 @@ ________________________________________________________________________________
|
|||
|
||||
<nasal>
|
||||
<script><![CDATA[
|
||||
self = cmdarg().getParent();
|
||||
data = self.getNode("data");
|
||||
mode = data.getNode("mode");
|
||||
modifier = data.getNode("modifier");
|
||||
f1 = f2 = 0;
|
||||
left_brake = right_brake = 0;
|
||||
trigger = 0;
|
||||
var self = cmdarg().getParent();
|
||||
var data = self.getNode("data");
|
||||
var mode = data.getNode("mode");
|
||||
var modifier = data.getNode("modifier");
|
||||
var f1 = 0;
|
||||
var f2 = 0;
|
||||
var left_brake = 0;
|
||||
var right_brake = 0;
|
||||
var trigger = 0;
|
||||
|
||||
if (props.globals.getNode("/rotors", 0) != nil) {
|
||||
self.getNode("axis[0]/binding/power").setIntValue(1);
|
||||
self.getNode("axis[1]/binding/power").setIntValue(1);
|
||||
}
|
||||
|
||||
kbdshift = props.globals.getNode("/devices/status/keyboard/shift", 1);
|
||||
kbdctrl = props.globals.getNode("/devices/status/keyboard/ctrl", 1);
|
||||
kbdalt = props.globals.getNode("/devices/status/keyboard/alt", 1);
|
||||
var kbdshift = props.globals.getNode("/devices/status/keyboard/shift", 1);
|
||||
var kbdctrl = props.globals.getNode("/devices/status/keyboard/ctrl", 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") {
|
||||
thv = getprop("/controls/engines/engine[0]/mixture");
|
||||
gui.popupTip("Thrust vector " ~ int(thv * 120 - 20 + 0.5));
|
||||
|
@ -296,7 +298,7 @@ ________________________________________________________________________________
|
|||
} elsif (m == 1) {
|
||||
i = !getprop("/controls/gear/tailwheel-lock");
|
||||
setprop("/controls/gear/tailwheel-lock", i);
|
||||
gui.popupTip("Tail Wheel " ~ ["UNLOCKED", "LOCKED"][i]);
|
||||
gui.popupTip("Tail Wheel " ~ (i ? "LOCKED" : "UNLOCKED"));
|
||||
} elsif (m == 2) {
|
||||
setprop("/sim/current-view/view-number", 0);
|
||||
view.resetView();
|
||||
|
|
Loading…
Reference in a new issue