2003-11-27 23:43:43 +00:00
|
|
|
<?xml version="1.0"?>
|
2006-03-25 07:49:52 +00:00
|
|
|
|
2003-11-27 23:43:43 +00:00
|
|
|
<PropertyList>
|
2004-05-12 15:37:17 +00:00
|
|
|
<name>airports</name>
|
|
|
|
<layout>vbox</layout>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<label>Select an Airport</label>
|
|
|
|
</text>
|
2003-11-27 23:43:43 +00:00
|
|
|
|
2007-03-26 15:25:27 +00:00
|
|
|
<hrule/>
|
2006-03-25 07:49:52 +00:00
|
|
|
|
2006-03-31 10:26:08 +00:00
|
|
|
<nasal>
|
|
|
|
<open>
|
|
|
|
var id = "";
|
|
|
|
var node = props.globals.getNode("/sim/gui/dialogs/airports", 1);
|
2008-07-30 21:56:18 +00:00
|
|
|
if (node.getNode("list") == nil)
|
2006-03-31 10:26:08 +00:00
|
|
|
node.getNode("list", 1).setValue("");
|
2008-07-30 21:56:18 +00:00
|
|
|
|
2006-03-31 10:26:08 +00:00
|
|
|
node = node.getNode("list");
|
|
|
|
|
2008-07-30 21:56:18 +00:00
|
|
|
var listbox = func {
|
2006-03-31 10:26:08 +00:00
|
|
|
id = pop(split(" ", node.getValue()));
|
|
|
|
id = substr(id, 1, size(id) - 2); # strip parentheses
|
|
|
|
}
|
|
|
|
|
2008-07-30 21:56:18 +00:00
|
|
|
var apply = func {
|
2006-03-31 10:26:08 +00:00
|
|
|
setprop("/sim/presets/airport-id", id);
|
|
|
|
setprop("/sim/presets/longitude-deg", -9999);
|
|
|
|
setprop("/sim/presets/latitude-deg", -9999);
|
|
|
|
setprop("/sim/presets/altitude-ft", -9999);
|
|
|
|
setprop("/sim/presets/airspeed-kt", 0);
|
2008-05-01 21:15:40 +00:00
|
|
|
setprop("/sim/presets/offset-distance-nm", 0);
|
|
|
|
setprop("/sim/presets/offset-azimuth-deg", 0);
|
2006-03-31 10:26:08 +00:00
|
|
|
setprop("/sim/presets/glideslope-deg", 0);
|
|
|
|
setprop("/sim/presets/heading-deg", 0);
|
|
|
|
setprop("/sim/presets/runway", "");
|
|
|
|
}
|
|
|
|
</open>
|
|
|
|
</nasal>
|
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<airport-list>
|
2006-03-31 10:26:08 +00:00
|
|
|
<name>airport-list</name>
|
2004-05-12 15:37:17 +00:00
|
|
|
<pref-width>440</pref-width>
|
|
|
|
<pref-height>360</pref-height>
|
2006-03-31 10:26:08 +00:00
|
|
|
<property>/sim/gui/dialogs/airports/list</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>airport-list</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>listbox()</script>
|
|
|
|
</binding>
|
2004-05-12 15:37:17 +00:00
|
|
|
</airport-list>
|
2003-11-27 23:43:43 +00:00
|
|
|
|
2006-03-31 10:26:08 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<default-padding>4</default-padding>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<label>Airport:</label>
|
|
|
|
<pref-width>60</pref-width>
|
|
|
|
</text>
|
|
|
|
|
|
|
|
<input>
|
|
|
|
<name>input</name>
|
|
|
|
<pref-width>280</pref-width>
|
|
|
|
<property>/sim/gui/dialogs/airports/list</property>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>input</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-update</command>
|
|
|
|
<object-name>airport-list</object-name>
|
|
|
|
</binding>
|
|
|
|
</input>
|
|
|
|
|
|
|
|
<button>
|
|
|
|
<legend>Search</legend>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>input</object-name>
|
|
|
|
</binding>
|
|
|
|
<binding>
|
|
|
|
<command>dialog-update</command>
|
|
|
|
<object-name>airport-list</object-name>
|
|
|
|
</binding>
|
|
|
|
</button>
|
|
|
|
</group>
|
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<default-padding>10</default-padding>
|
|
|
|
<empty><stretch>true</stretch></empty>
|
2003-11-27 23:43:43 +00:00
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<button>
|
2004-12-27 13:37:06 +00:00
|
|
|
<legend>Apply</legend>
|
2004-05-12 15:37:17 +00:00
|
|
|
<equal>true</equal>
|
|
|
|
<default>true</default>
|
|
|
|
<binding>
|
2005-01-31 10:37:21 +00:00
|
|
|
<command>dialog-apply</command>
|
2006-03-31 10:26:08 +00:00
|
|
|
<object-name>airport-list</object-name>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
2006-03-31 10:26:08 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>apply()</script>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
2006-03-31 10:26:08 +00:00
|
|
|
<command>presets-commit</command>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
2003-11-27 23:43:43 +00:00
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<empty><stretch>true</stretch></empty>
|
2003-11-27 23:43:43 +00:00
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<button>
|
2004-12-27 13:37:06 +00:00
|
|
|
<legend>Close</legend>
|
2004-05-12 15:37:17 +00:00
|
|
|
<equal>true</equal>
|
2005-11-05 18:42:28 +00:00
|
|
|
<key>Esc</key>
|
2006-03-31 10:26:08 +00:00
|
|
|
<binding>
|
|
|
|
<command>dialog-apply</command>
|
|
|
|
<object-name>input</object-name>
|
|
|
|
</binding>
|
2004-05-12 15:37:17 +00:00
|
|
|
<binding>
|
2006-03-25 07:49:52 +00:00
|
|
|
<command>dialog-close</command>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
2003-11-27 23:43:43 +00:00
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<empty><stretch>true</stretch></empty>
|
|
|
|
</group>
|
2003-11-27 23:43:43 +00:00
|
|
|
</PropertyList>
|