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>
|
2009-01-10 22:20:15 +00:00
|
|
|
<resizable>true</resizable>
|
2004-05-12 15:37:17 +00:00
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<empty><stretch>1</stretch></empty>
|
|
|
|
|
|
|
|
<text>
|
|
|
|
<label>Select an Airport</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>
|
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", "");
|
2008-12-12 20:09:55 +00:00
|
|
|
setprop("/sim/presets/parkpos", "");
|
2006-03-31 10:26:08 +00:00
|
|
|
}
|
|
|
|
</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>
|
2009-01-10 22:20:15 +00:00
|
|
|
<halign>fill</halign>
|
|
|
|
<valign>fill</valign>
|
|
|
|
<stretch>true</stretch>
|
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>
|
2009-01-10 22:20:15 +00:00
|
|
|
<halign>fill</halign>
|
|
|
|
<stretch>true</stretch>
|
2006-03-31 10:26:08 +00:00
|
|
|
<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>
|
|
|
|
|
2010-12-27 20:19:31 +00:00
|
|
|
<hrule/>
|
|
|
|
|
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>
|