1
0
Fork 0

disabling the dialog in screenshots is nice in theory, but doesn't really work

This commit is contained in:
mfranz 2009-01-31 22:01:42 +00:00
parent 9fdec57110
commit a644007c67

View file

@ -324,25 +324,19 @@ var fly_by_view_handler = {
var model_view_handler = { var model_view_handler = {
init: func(node) { init: func(node) {
me.lnr = [];
me.viewN = node; me.viewN = node;
me.current = nil; me.current = nil;
me.legendN = props.globals.initNode("/sim/current-view/model-view", ""); me.legendN = props.globals.initNode("/sim/current-view/model-view", "");
me.dialog = props.Node.new({ "dialog-name": "model-view" }); me.dialog = props.Node.new({ "dialog-name": "model-view" });
}, },
start: func { start: func {
me.lnr = []; me.listener = setlistener("/sim/signals/multiplayer-updated", func me._update_(), 1);
append(me.lnr, setlistener("/sim/signals/multiplayer-updated", func me._update_(), 1));
append(me.lnr, setlistener("/sim/signals/screenshot", func(n) {
n.getValue() ? me.dialog_close() : me.dialog_open();
}));
me.reset(); me.reset();
me.open_dialog(); fgcommand("dialog-show", me.dialog);
}, },
stop: func { stop: func {
me.close_dialog(); fgcommand("dialog-close", me.dialog);
foreach (var l; me.lnr) removelistener(me.listener);
removelistener(l);
}, },
reset: func { reset: func {
me.select(0); me.select(0);
@ -393,12 +387,6 @@ var model_view_handler = {
"target-alt-ft-path": data.path ~ "/position/altitude-ft", "target-alt-ft-path": data.path ~ "/position/altitude-ft",
}); });
}, },
open_dialog: func {
fgcommand("dialog-show", me.dialog);
},
close_dialog: func {
fgcommand("dialog-close", me.dialog);
},
}; };