118 lines
2.6 KiB
XML
118 lines
2.6 KiB
XML
<?xml version="1.0"?>
|
|
<PropertyList>
|
|
<nasal>
|
|
<open>
|
|
<![CDATA[
|
|
var self = cmdarg();
|
|
var dlgname = self.getNode("name").getValue();
|
|
|
|
self.getNode("group").removeChildren("button");
|
|
|
|
var textgroup = self.getNode("group").getNode("button-template");
|
|
|
|
var apts = findAirportsWithinRange(50);
|
|
if (size(apts) > 0) {
|
|
forindex (var i; apts) {
|
|
var target = self.getNode("group").getChild("button", i, 1);
|
|
props.copy(textgroup, target);
|
|
target.getNode("legend").setValue(apts[i].id);
|
|
target.getNode("binding/value").setValue(apts[i].id);
|
|
target.getNode("enabled").setValue(1);
|
|
}
|
|
props.dump(target);
|
|
} else {
|
|
self.getNode("text/enabled").setValue(1);
|
|
}
|
|
]]>
|
|
</open>
|
|
</nasal>
|
|
<name>atc-freq-search</name>
|
|
<layout>vbox</layout>
|
|
|
|
<text>
|
|
<label>Display Nearest Airport Frequencies</label>
|
|
</text>
|
|
<hrule/>
|
|
|
|
<group>
|
|
<name>quick-buttons</name>
|
|
<layout>hbox</layout>
|
|
<halign>center</halign>
|
|
<button-template>
|
|
<enabled>false</enabled>
|
|
<legend>ICAO</legend>
|
|
<binding>
|
|
<command>property-assign</command>
|
|
<property>/sim/atc/freq-airport</property>
|
|
<value type="string">ICAO</value>
|
|
</binding>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>atc-freq-display</dialog-name>
|
|
</binding>
|
|
<binding>
|
|
<command>dialog-close</command>
|
|
</binding>
|
|
</button-template>
|
|
</group>
|
|
|
|
<text>
|
|
<name>no-atc-in-range</name>
|
|
<enabled>false</enabled>
|
|
<label>No ATC in range 50 nm.</label>
|
|
</text>
|
|
|
|
<group>
|
|
<layout>hbox</layout>
|
|
<empty><stretch>true</stretch></empty>
|
|
<text>
|
|
<label>Airport identifier:</label>
|
|
</text>
|
|
<input>
|
|
<halign>fill</halign>
|
|
<stretch>false</stretch>
|
|
<property>/sim/atc/freq-airport</property>
|
|
</input>
|
|
<empty><stretch>true</stretch></empty>
|
|
</group>
|
|
|
|
<group>
|
|
<layout>hbox</layout>
|
|
<halign>fill</halign>
|
|
<default-padding>10</default-padding>
|
|
<empty><stretch>true</stretch></empty>
|
|
|
|
<button>
|
|
<legend>Search</legend>
|
|
<default>true</default>
|
|
<equal>true</equal>
|
|
<binding>
|
|
<command>dialog-apply</command>
|
|
</binding>
|
|
<binding>
|
|
<command>dialog-show</command>
|
|
<dialog-name>atc-freq-display</dialog-name>
|
|
<!--
|
|
<params>
|
|
<icao type="string">ICAO</icao>
|
|
</params>
|
|
-->
|
|
</binding>
|
|
<binding>
|
|
<command>dialog-close</command>
|
|
</binding>
|
|
</button>
|
|
|
|
<empty><stretch>true</stretch></empty>
|
|
|
|
<button>
|
|
<legend>Cancel</legend>
|
|
<equal>true</equal>
|
|
<key>Esc</key>
|
|
<binding>
|
|
<command>dialog-close</command>
|
|
</binding>
|
|
</button>
|
|
<empty><stretch>true</stretch></empty>
|
|
</group>
|
|
</PropertyList>
|