2007-11-19 16:26:15 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
|
|
|
|
<PropertyList>
|
|
|
|
<name>view</name>
|
|
|
|
<modal>false</modal>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<empty><stretch>1</stretch></empty>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<label>View Options</label>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<empty><stretch>1</stretch></empty>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<pref-width>16</pref-width>
|
|
|
|
<pref-height>16</pref-height>
|
|
|
|
<legend></legend>
|
|
|
|
<keynum>27</keynum>
|
|
|
|
<border>2</border>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</group>
|
|
|
|
|
|
|
|
<hrule/>
|
|
|
|
|
2007-11-19 16:26:15 +00:00
|
|
|
<text>
|
2011-07-11 21:15:23 +00:00
|
|
|
<label>Select Active Views</label>
|
2007-11-19 16:26:15 +00:00
|
|
|
</text>
|
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<nasal>
|
2007-11-19 16:26:15 +00:00
|
|
|
<open>
|
2010-12-27 20:19:31 +00:00
|
|
|
var group = cmdarg().getChildren("group")[1];
|
2007-11-19 16:26:15 +00:00
|
|
|
var ac = getprop("/sim/aircraft");
|
|
|
|
group.removeChildren("checkbox");
|
|
|
|
group.removeChildren("hrule");
|
|
|
|
group.removeChildren("text");
|
2007-11-20 17:26:21 +00:00
|
|
|
var mode = 0;
|
2007-11-19 16:26:15 +00:00
|
|
|
foreach (var v; view.views) {
|
|
|
|
var index = v.getIndex();
|
2008-11-22 19:53:37 +00:00
|
|
|
var enabled = v.initNode("enabled", 1, "BOOL");
|
2011-06-12 13:31:57 +00:00
|
|
|
var name = v.getNode("name");
|
|
|
|
if (name != nil) {
|
|
|
|
if (index >= 200) {
|
|
|
|
if (mode != 2) {
|
|
|
|
mode = 2;
|
|
|
|
group.getChild("hrule", 1, 1);
|
|
|
|
var t = group.getChild("text", 1, 1);
|
|
|
|
t.getNode("label", 1).setValue("Other Views");
|
|
|
|
}
|
2008-07-30 21:54:01 +00:00
|
|
|
|
2011-06-12 13:31:57 +00:00
|
|
|
} elsif (index >= 100) {
|
|
|
|
aircraft.data.add(enabled);
|
|
|
|
if (mode != 1) {
|
|
|
|
mode = 1;
|
|
|
|
group.getChild("hrule", 0, 1);
|
|
|
|
var t = group.getChild("text", 0, 1);
|
|
|
|
t.getNode("label", 1).setValue("\"" ~ ac ~ "\" Specific Views");
|
|
|
|
}
|
2007-11-20 17:26:21 +00:00
|
|
|
}
|
2007-11-19 16:26:15 +00:00
|
|
|
|
2011-06-12 13:31:57 +00:00
|
|
|
var target = group.getChild("checkbox", index, 1);
|
|
|
|
props.copy(group.getNode("checkbox-template"), target);
|
|
|
|
target.getNode("label").setValue(name != nil ? name.getValue() : ("** unnamed view " ~ index ~ " **"));
|
|
|
|
target.getNode("property").setValue(enabled.getPath());
|
2007-11-19 16:26:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</open>
|
|
|
|
</nasal>
|
|
|
|
|
|
|
|
<group>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
<halign>center</halign>
|
|
|
|
|
|
|
|
<checkbox-template>
|
|
|
|
<halign>left</halign>
|
|
|
|
<label><!----></label>
|
|
|
|
<property><!----></property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
</checkbox-template>
|
|
|
|
</group>
|
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<hrule/>
|
|
|
|
|
2007-11-19 16:26:15 +00:00
|
|
|
<button>
|
|
|
|
<legend>Close</legend>
|
|
|
|
<default>true</default>
|
|
|
|
<key>Esc</key>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-close</command>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</PropertyList>
|