1
0
Fork 0

Disabled old 'Model View' selector by default.

It is now called 'Legacy multiplayer view selector', and enabled/disabled via
new checkbox in the 'View - View Options' dialogue.
This commit is contained in:
Julian Smith 2019-08-04 17:10:47 +01:00
parent 2e5e314a77
commit f591120032
2 changed files with 21 additions and 1 deletions

View file

@ -467,10 +467,21 @@ var model_view_handler_class = {
m.dialog = props.Node.new({ "dialog-name": "model-view" });
m.listener = setlistener("/sim/signals/multiplayer-updated", func m._update_(), 1);
m.reset();
_setlistener("/sim/menubar/legacy-multiplayer-view-selector/enabled", func {
var enabled = getprop("/sim/menubar/legacy-multiplayer-view-selector/enabled");
if (enabled) {
m.start();
}
else {
m.stop();
}
});
return m;
},
start: func() {
fgcommand("dialog-show", me.dialog);
if (getprop('/sim/menubar/legacy-multiplayer-view-selector/enabled')) {
fgcommand("dialog-show", me.dialog);
}
me.next(0);
},
stop: func() {

View file

@ -257,6 +257,15 @@
<label>sec.</label>
</text>
</group>
<checkbox>
<halign>left</halign>
<label>Legacy multiplayer view selector</label>
<property>/sim/menubar/legacy-multiplayer-view-selector/enabled</property>
<binding>
<command>dialog-apply</command>
</binding>
</checkbox>
</group>