1
0
Fork 0

open fps dialog initially

This commit is contained in:
mfranz 2005-12-21 10:41:22 +00:00
parent 2bbfa45118
commit e6ba63050e

View file

@ -71,6 +71,9 @@ INIT = func {
menuEnable("autopilot", props.globals.getNode("/autopilot/KAP140/locks") == nil);
setlistener("/sim/rendering/fps-display", fpsDisplay);
if (getprop("/sim/rendering/fps-display")) {
fgcommand("dialog-show", props.Node.new({"dialog-name": "fps"}));
}
}
settimer(INIT, 0);
@ -78,14 +81,9 @@ settimer(INIT, 0);
##
# Show/hide the fps display dialog.
#
var show_fps = 0;
fpsDisplay = func {
var i = cmdarg().getBoolValue();
if (i != show_fps) {
fgcommand(i ? "dialog-show" : "dialog-close",
props.Node.new({"dialog-name": "fps"}));
show_fps = i;
}
var cmd = cmdarg().getBoolValue() ? "dialog-show" : "dialog-close";
fgcommand(cmd, props.Node.new({"dialog-name": "fps"}));
}