disabling the dialog in screenshots is nice in theory, but doesn't really work
This commit is contained in:
parent
9fdec57110
commit
a644007c67
1 changed files with 4 additions and 16 deletions
|
@ -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);
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue