open fps dialog initially
This commit is contained in:
parent
2bbfa45118
commit
e6ba63050e
1 changed files with 5 additions and 7 deletions
|
@ -71,6 +71,9 @@ INIT = func {
|
||||||
menuEnable("autopilot", props.globals.getNode("/autopilot/KAP140/locks") == nil);
|
menuEnable("autopilot", props.globals.getNode("/autopilot/KAP140/locks") == nil);
|
||||||
|
|
||||||
setlistener("/sim/rendering/fps-display", fpsDisplay);
|
setlistener("/sim/rendering/fps-display", fpsDisplay);
|
||||||
|
if (getprop("/sim/rendering/fps-display")) {
|
||||||
|
fgcommand("dialog-show", props.Node.new({"dialog-name": "fps"}));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
settimer(INIT, 0);
|
settimer(INIT, 0);
|
||||||
|
|
||||||
|
@ -78,14 +81,9 @@ settimer(INIT, 0);
|
||||||
##
|
##
|
||||||
# Show/hide the fps display dialog.
|
# Show/hide the fps display dialog.
|
||||||
#
|
#
|
||||||
var show_fps = 0;
|
|
||||||
fpsDisplay = func {
|
fpsDisplay = func {
|
||||||
var i = cmdarg().getBoolValue();
|
var cmd = cmdarg().getBoolValue() ? "dialog-show" : "dialog-close";
|
||||||
if (i != show_fps) {
|
fgcommand(cmd, props.Node.new({"dialog-name": "fps"}));
|
||||||
fgcommand(i ? "dialog-show" : "dialog-close",
|
|
||||||
props.Node.new({"dialog-name": "fps"}));
|
|
||||||
show_fps = i;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue