Merge branch 'master' of gitorious.org:fg/fgdata into work
This commit is contained in:
commit
eef2deab1f
3 changed files with 18 additions and 6 deletions
|
@ -1034,9 +1034,15 @@ var HUD = {
|
||||||
init: func {
|
init: func {
|
||||||
me.vis1N = props.globals.getNode("/sim/hud/visibility[1]", 1);
|
me.vis1N = props.globals.getNode("/sim/hud/visibility[1]", 1);
|
||||||
me.currcolN = props.globals.getNode("/sim/hud/current-color", 1);
|
me.currcolN = props.globals.getNode("/sim/hud/current-color", 1);
|
||||||
|
me.currentPathN = props.globals.getNode("/sim/hud/current-path", 1);
|
||||||
|
me.hudN = props.globals.getNode("/sim/hud", 1);
|
||||||
me.paletteN = props.globals.getNode("/sim/hud/palette", 1);
|
me.paletteN = props.globals.getNode("/sim/hud/palette", 1);
|
||||||
me.brightnessN = props.globals.getNode("/sim/hud/color/brightness", 1);
|
me.brightnessN = props.globals.getNode("/sim/hud/color/brightness", 1);
|
||||||
me.currentN = me.vis1N;
|
me.currentN = me.vis1N;
|
||||||
|
|
||||||
|
# keep compatibility with earlier version of FG - hud/path[1] is
|
||||||
|
# the default Hud
|
||||||
|
me.currentPathN.setIntValue(1);
|
||||||
},
|
},
|
||||||
cycle_color: func { # h-key
|
cycle_color: func { # h-key
|
||||||
if (!me.currentN.getBoolValue()) # if off, turn on
|
if (!me.currentN.getBoolValue()) # if off, turn on
|
||||||
|
@ -1057,10 +1063,16 @@ var HUD = {
|
||||||
me.brightnessN.setValue(br > 0.01 ? br : 1);
|
me.brightnessN.setValue(br > 0.01 ? br : 1);
|
||||||
},
|
},
|
||||||
normal_type: func { # i-key
|
normal_type: func { # i-key
|
||||||
|
me.currentPathN.setIntValue(1);
|
||||||
},
|
},
|
||||||
cycle_type: func { # I-key
|
cycle_type: func { # I-key
|
||||||
|
var i = me.currentPathN.getValue() + 1;
|
||||||
|
if (i < 1 or i > size(me.hudN.getChildren("path"))) {
|
||||||
|
# back to the start
|
||||||
|
me.currentPathN.setIntValue(1);
|
||||||
|
} else {
|
||||||
|
me.currentPathN.setIntValue(i);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
is_active: func {
|
is_active: func {
|
||||||
me.vis1N.getValue();
|
me.vis1N.getValue();
|
||||||
|
|
|
@ -685,7 +685,6 @@ top down before the key bindings are parsed.
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
<!-- no longer used
|
|
||||||
<key n="73">
|
<key n="73">
|
||||||
<name>I</name>
|
<name>I</name>
|
||||||
<desc>Switch to and toggle alternative HUD types</desc>
|
<desc>Switch to and toggle alternative HUD types</desc>
|
||||||
|
@ -693,7 +692,7 @@ top down before the key bindings are parsed.
|
||||||
<command>nasal</command>
|
<command>nasal</command>
|
||||||
<script>aircraft.HUD.cycle_type()</script>
|
<script>aircraft.HUD.cycle_type()</script>
|
||||||
</binding>
|
</binding>
|
||||||
</key> -->
|
</key>
|
||||||
|
|
||||||
<key n="77">
|
<key n="77">
|
||||||
<name>M</name>
|
<name>M</name>
|
||||||
|
@ -908,7 +907,6 @@ top down before the key bindings are parsed.
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
|
|
||||||
<!-- no longer used
|
|
||||||
<key n="105">
|
<key n="105">
|
||||||
<name>i</name>
|
<name>i</name>
|
||||||
<desc>Normal HUD</desc>
|
<desc>Normal HUD</desc>
|
||||||
|
@ -917,7 +915,6 @@ top down before the key bindings are parsed.
|
||||||
<script>aircraft.HUD.normal_type()</script>
|
<script>aircraft.HUD.normal_type()</script>
|
||||||
</binding>
|
</binding>
|
||||||
</key>
|
</key>
|
||||||
-->
|
|
||||||
|
|
||||||
<key n="106">
|
<key n="106">
|
||||||
<name>j</name>
|
<name>j</name>
|
||||||
|
|
|
@ -327,6 +327,9 @@ Started September 2000 by David Megginson, david@megginson.com
|
||||||
</panel_2>
|
</panel_2>
|
||||||
<hud>
|
<hud>
|
||||||
<path n="1">Huds/default.xml</path>
|
<path n="1">Huds/default.xml</path>
|
||||||
|
<path n="2">Huds/NTPS.xml</path>
|
||||||
|
<path n="3">Huds/minimal.xml</path>
|
||||||
|
|
||||||
<!-- new HUD -->
|
<!-- new HUD -->
|
||||||
<visibility n="1"
|
<visibility n="1"
|
||||||
type="bool">false</visibility>
|
type="bool">false</visibility>
|
||||||
|
|
Loading…
Add table
Reference in a new issue