2003-01-21 15:47:37 +00:00
|
|
|
<?xml version="1.0"?>
|
2006-03-31 10:30:46 +00:00
|
|
|
|
2003-01-21 15:47:37 +00:00
|
|
|
<PropertyList>
|
2004-05-12 15:37:17 +00:00
|
|
|
<name>location-on-ground</name>
|
|
|
|
<layout>vbox</layout>
|
2006-03-31 10:30:46 +00:00
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<text>
|
|
|
|
<label>Set New Location</label>
|
|
|
|
</text>
|
2006-03-31 10:30:46 +00:00
|
|
|
|
2007-03-26 15:25:27 +00:00
|
|
|
<hrule/>
|
2006-03-31 10:30:46 +00:00
|
|
|
|
|
|
|
<nasal>
|
|
|
|
<open>
|
2007-10-04 15:47:54 +00:00
|
|
|
var dlg = props.globals.getNode("/sim/gui/dialogs/location-on-ground", 1);
|
|
|
|
var apt = dlg.getNode("airport", 1);
|
2006-03-31 10:30:46 +00:00
|
|
|
apt.setValue("");
|
2007-10-04 15:47:54 +00:00
|
|
|
var rwy = dlg.getNode("runway", 1);
|
2006-03-31 10:30:46 +00:00
|
|
|
rwy.setValue("");
|
2008-12-12 20:09:55 +00:00
|
|
|
var parkpos = dlg.getNode("parkpos", 1);
|
|
|
|
parkpos.setValue("");
|
|
|
|
|
|
|
|
var mode = {
|
|
|
|
runway: dlg.getNode("use_runway", 1),
|
|
|
|
parkpos: dlg.getNode("use_parkpos", 1)
|
|
|
|
};
|
|
|
|
|
|
|
|
var set_radio = func(m) {
|
|
|
|
foreach (k; keys(mode)) {
|
|
|
|
mode[k].setBoolValue(m == k);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var initialized = 0;
|
|
|
|
foreach (k; keys(mode)) {
|
|
|
|
if (mode[k].getType() == "NONE" or initialized) {
|
|
|
|
mode[k].setBoolValue(0);
|
|
|
|
} else {
|
|
|
|
initialized += mode[k].getBoolValue();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!initialized) {
|
|
|
|
set_radio("runway");
|
|
|
|
}
|
2006-03-31 10:30:46 +00:00
|
|
|
</open>
|
|
|
|
</nasal>
|
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<group>
|
|
|
|
<layout>table</layout>
|
|
|
|
<halign>center</halign>
|
|
|
|
<text>
|
2008-12-12 20:09:55 +00:00
|
|
|
<row>0</row><col>1</col>
|
|
|
|
<halign>right</halign>
|
2004-05-12 15:37:17 +00:00
|
|
|
<label>Airport:</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
2008-12-12 20:09:55 +00:00
|
|
|
<row>0</row><col>2</col>
|
2006-03-31 10:30:46 +00:00
|
|
|
<property>/sim/gui/dialogs/location-on-ground/airport</property>
|
2004-05-12 15:37:17 +00:00
|
|
|
</input>
|
2008-12-12 20:09:55 +00:00
|
|
|
|
|
|
|
<radio>
|
2004-05-12 15:37:17 +00:00
|
|
|
<row>1</row><col>0</col>
|
2008-12-12 20:09:55 +00:00
|
|
|
<property>/sim/gui/dialogs/location-on-ground/use_runway</property>
|
|
|
|
<live>true</live>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("runway")</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
|
|
|
<text>
|
|
|
|
<row>1</row><col>1</col>
|
|
|
|
<halign>right</halign>
|
2004-05-12 15:37:17 +00:00
|
|
|
<label>Runway:</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
2008-12-12 20:09:55 +00:00
|
|
|
<row>1</row><col>2</col>
|
2006-03-31 10:30:46 +00:00
|
|
|
<property>/sim/gui/dialogs/location-on-ground/runway</property>
|
2004-05-12 15:37:17 +00:00
|
|
|
</input>
|
2008-12-12 20:09:55 +00:00
|
|
|
<radio>
|
|
|
|
<row>2</row><col>0</col>
|
|
|
|
<property>/sim/gui/dialogs/location-on-ground/use_parkpos</property>
|
|
|
|
<live>true</live>
|
|
|
|
<binding>
|
|
|
|
<command>nasal</command>
|
|
|
|
<script>set_radio("parkpos")</script>
|
|
|
|
</binding>
|
|
|
|
</radio>
|
|
|
|
<text>
|
|
|
|
<row>2</row><col>1</col>
|
|
|
|
<halign>right</halign>
|
|
|
|
<label>Parking:</label>
|
|
|
|
</text>
|
|
|
|
<input>
|
|
|
|
<row>2</row><col>2</col>
|
|
|
|
<property>/sim/gui/dialogs/location-on-ground/parkpos</property>
|
|
|
|
</input>
|
2004-05-12 15:37:17 +00:00
|
|
|
</group>
|
2003-01-21 15:47:37 +00:00
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<group>
|
|
|
|
<layout>hbox</layout>
|
|
|
|
<default-padding>10</default-padding>
|
|
|
|
<empty><stretch>true</stretch></empty>
|
2003-01-21 15:47:37 +00:00
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<button>
|
|
|
|
<legend>OK</legend>
|
|
|
|
<default>true</default>
|
|
|
|
<equal>true</equal>
|
|
|
|
<binding>
|
2006-03-31 10:30:46 +00:00
|
|
|
<command>dialog-apply</command>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
2006-03-31 10:30:46 +00:00
|
|
|
<command>nasal</command>
|
|
|
|
<script>
|
|
|
|
setprop("/sim/presets/airport-id", apt.getValue());
|
2008-12-12 20:09:55 +00:00
|
|
|
if (mode["runway"].getBoolValue()) {
|
|
|
|
setprop("/sim/presets/runway", rwy.getValue());
|
|
|
|
setprop("/sim/presets/parkpos", "");
|
|
|
|
} else {
|
|
|
|
setprop("/sim/presets/runway", "");
|
|
|
|
setprop("/sim/presets/parkpos", parkpos.getValue());
|
|
|
|
}
|
2006-03-31 10:30:46 +00:00
|
|
|
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-nm", 0);
|
2006-03-31 10:30:46 +00:00
|
|
|
setprop("/sim/presets/glideslope-deg", 0);
|
2007-10-04 15:47:54 +00:00
|
|
|
setprop("/sim/presets/heading-deg", 9999);
|
2006-03-31 10:30:46 +00:00
|
|
|
</script>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
2006-03-31 10:30:46 +00:00
|
|
|
<command>presets-commit</command>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
<binding>
|
2006-03-31 10:30:46 +00:00
|
|
|
<command>dialog-close</command>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
2003-01-21 15:47:37 +00:00
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<empty><stretch>true</stretch></empty>
|
2003-01-21 15:47:37 +00:00
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<button>
|
|
|
|
<legend>Cancel</legend>
|
2006-03-31 10:30:46 +00:00
|
|
|
<equal>true</equal>
|
2005-11-05 18:42:28 +00:00
|
|
|
<key>Esc</key>
|
2004-05-12 15:37:17 +00:00
|
|
|
<binding>
|
2006-03-31 10:30:46 +00:00
|
|
|
<command>dialog-close</command>
|
2004-05-12 15:37:17 +00:00
|
|
|
</binding>
|
|
|
|
</button>
|
2003-01-21 15:47:37 +00:00
|
|
|
|
2004-05-12 15:37:17 +00:00
|
|
|
<empty><stretch>true</stretch></empty>
|
|
|
|
</group>
|
2003-01-27 19:55:48 +00:00
|
|
|
</PropertyList>
|