1
0
Fork 0

Switch over to v2 HUD by default, v1 HUD is no longer used.

This commit is contained in:
James Turner 2010-10-29 00:56:42 +01:00
parent 3b1b2fd879
commit c7560f61b4
2 changed files with 10 additions and 33 deletions

View file

@ -954,12 +954,11 @@ var kias_to_ktas = func(kias, altitude) {
#
var HUD = {
init: func {
me.vis0N = props.globals.getNode("/sim/hud/visibility[0]", 1);
me.vis1N = props.globals.getNode("/sim/hud/visibility[1]", 1);
me.currcolN = props.globals.getNode("/sim/hud/current-color", 1);
me.paletteN = props.globals.getNode("/sim/hud/palette", 1);
me.brightnessN = props.globals.getNode("/sim/hud/color/brightness", 1);
me.currentN = me.vis0N;
me.currentN = me.vis1N;
},
cycle_color: func { # h-key
if (!me.currentN.getBoolValue()) # if off, turn on
@ -979,34 +978,14 @@ var HUD = {
var br = me.brightnessN.getValue() - 0.2;
me.brightnessN.setValue(br > 0.01 ? br : 1);
},
normal_type: func { # i-key
me.is_active() or return;
me.oldinit1();
me.vis0N.setBoolValue(1);
me.vis1N.setBoolValue(0);
me.currentN = me.vis0N;
},
cycle_type: func { # I-key
me.is_active() or return;
if (me.currentN == me.vis0N) {
me.vis0N.setBoolValue(0);
me.vis1N.setBoolValue(1);
me.currentN = me.vis1N;
} elsif (me.currentN == me.vis1N) {
me.vis0N.setBoolValue(1);
me.vis1N.setBoolValue(0);
me.oldinit2();
me.currentN = me.vis0N;
}
},
oldinit1: func {
fgcommand("hud-init");
},
oldinit2: func {
fgcommand("hud-init2");
},
normal_type: func { # i-key
},
cycle_type: func { # I-key
},
is_active: func {
me.vis0N.getValue() or me.vis1N.getValue();
me.vis1N.getValue();
},
};

View file

@ -249,10 +249,8 @@ Started September 2000 by David Megginson, david@megginson.com
<path>Aircraft/Generic/Panels/generic-trans-mini-panel.xml</path>
</panel_2>
<hud>
<path>Huds/Default/default.xml</path>
<path>Huds/NTPS.xml</path> <!-- new HUD -->
<visibility type="bool">false</visibility>
<visibility type="bool">false</visibility> <!-- new HUD -->
<path n="1">Huds/default.xml</path> <!-- new HUD -->
<visibility n="1" type="bool">false</visibility> <!-- new HUD -->
<font>
<name type="string">Helvetica.txf</name>
<size type="float">8</size>