Location-on-ground - show the airport name, since we have it.
This commit is contained in:
parent
4c047c235f
commit
9e0cedf568
1 changed files with 28 additions and 14 deletions
|
@ -32,6 +32,7 @@
|
||||||
<open>
|
<open>
|
||||||
var dlg = props.globals.getNode("/sim/gui/dialogs/location-on-ground", 1);
|
var dlg = props.globals.getNode("/sim/gui/dialogs/location-on-ground", 1);
|
||||||
var apt = dlg.getNode("airport", 1);
|
var apt = dlg.getNode("airport", 1);
|
||||||
|
var aptname = dlg.getNode("airport-name", 1);
|
||||||
apt.setValue(getprop("/sim/presets/airport-id"));
|
apt.setValue(getprop("/sim/presets/airport-id"));
|
||||||
var rwy = dlg.getNode("runway", 1);
|
var rwy = dlg.getNode("runway", 1);
|
||||||
rwy.setValue("");
|
rwy.setValue("");
|
||||||
|
@ -66,22 +67,25 @@
|
||||||
var parking = dlg.getNode("available-parking", 1);
|
var parking = dlg.getNode("available-parking", 1);
|
||||||
|
|
||||||
var updateAirport = func {
|
var updateAirport = func {
|
||||||
var icao = dlg.getNode("airport").getValue();
|
var icao = apt.getValue();
|
||||||
runways.removeChildren("value");
|
runways.removeChildren("value");
|
||||||
parking.removeChildren("value");
|
parking.removeChildren("value");
|
||||||
|
|
||||||
var apt = airportinfo(icao);
|
var a = airportinfo(icao);
|
||||||
if (apt == nil) {
|
if (a == nil) {
|
||||||
|
aptname.setValue("");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
aptname.setValue(a.name);
|
||||||
var i=0;
|
var i=0;
|
||||||
foreach (var rwy; keys(apt.runways)) {
|
foreach (var rwy; keys(a.runways)) {
|
||||||
runways.getNode("value[" ~ i ~ "]", 1).setValue(rwy);
|
runways.getNode("value[" ~ i ~ "]", 1).setValue(rwy);
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var park; apt.parking()) {
|
i = 0;
|
||||||
|
foreach (var park; a.parking()) {
|
||||||
parking.getNode("value[" ~ i ~ "]", 1).setValue(park);
|
parking.getNode("value[" ~ i ~ "]", 1).setValue(park);
|
||||||
i += 1;
|
i += 1;
|
||||||
}
|
}
|
||||||
|
@ -118,8 +122,18 @@
|
||||||
</binding>
|
</binding>
|
||||||
</input>
|
</input>
|
||||||
|
|
||||||
|
<text>
|
||||||
|
<row>1</row>
|
||||||
|
<col>1</col>
|
||||||
|
<format>%s</format>
|
||||||
|
<property>/sim/gui/dialogs/location-on-ground/airport-name</property>
|
||||||
|
<live>true</live>
|
||||||
|
<stretch>true</stretch>
|
||||||
|
<halign>fill</halign>
|
||||||
|
</text>
|
||||||
|
|
||||||
<radio>
|
<radio>
|
||||||
<row>1</row><col>0</col>
|
<row>2</row><col>0</col>
|
||||||
<property>/sim/gui/dialogs/location-on-ground/use_best_runway</property>
|
<property>/sim/gui/dialogs/location-on-ground/use_best_runway</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
<binding>
|
<binding>
|
||||||
|
@ -129,7 +143,7 @@
|
||||||
</radio>
|
</radio>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<row>1</row><col>1</col>
|
<row>2</row><col>1</col>
|
||||||
<halign>right</halign>
|
<halign>right</halign>
|
||||||
<label>Best runway</label>
|
<label>Best runway</label>
|
||||||
<enable>
|
<enable>
|
||||||
|
@ -137,7 +151,7 @@
|
||||||
</enable>
|
</enable>
|
||||||
</text>
|
</text>
|
||||||
<text>
|
<text>
|
||||||
<row>1</row><col>2</col>
|
<row>2</row><col>2</col>
|
||||||
<halign>right</halign>
|
<halign>right</halign>
|
||||||
<label>(based on wind)</label>
|
<label>(based on wind)</label>
|
||||||
<enable>
|
<enable>
|
||||||
|
@ -146,7 +160,7 @@
|
||||||
</text>
|
</text>
|
||||||
|
|
||||||
<radio>
|
<radio>
|
||||||
<row>2</row><col>0</col>
|
<row>3</row><col>0</col>
|
||||||
<property>/sim/gui/dialogs/location-on-ground/use_runway</property>
|
<property>/sim/gui/dialogs/location-on-ground/use_runway</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
<binding>
|
<binding>
|
||||||
|
@ -156,7 +170,7 @@
|
||||||
</radio>
|
</radio>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<row>2</row><col>1</col>
|
<row>3</row><col>1</col>
|
||||||
<halign>right</halign>
|
<halign>right</halign>
|
||||||
<label>Runway:</label>
|
<label>Runway:</label>
|
||||||
<enable>
|
<enable>
|
||||||
|
@ -166,7 +180,7 @@
|
||||||
|
|
||||||
<combo>
|
<combo>
|
||||||
<name>runway</name>
|
<name>runway</name>
|
||||||
<row>2</row><col>2</col>
|
<row>3</row><col>2</col>
|
||||||
<pref-width>85</pref-width>
|
<pref-width>85</pref-width>
|
||||||
<enable>
|
<enable>
|
||||||
<property>/sim/gui/dialogs/location-on-ground/use_runway</property>
|
<property>/sim/gui/dialogs/location-on-ground/use_runway</property>
|
||||||
|
@ -181,7 +195,7 @@
|
||||||
</combo>
|
</combo>
|
||||||
|
|
||||||
<radio>
|
<radio>
|
||||||
<row>3</row><col>0</col>
|
<row>4</row><col>0</col>
|
||||||
<property>/sim/gui/dialogs/location-on-ground/use_parkpos</property>
|
<property>/sim/gui/dialogs/location-on-ground/use_parkpos</property>
|
||||||
<live>true</live>
|
<live>true</live>
|
||||||
<binding>
|
<binding>
|
||||||
|
@ -191,7 +205,7 @@
|
||||||
</radio>
|
</radio>
|
||||||
|
|
||||||
<text>
|
<text>
|
||||||
<row>3</row><col>1</col>
|
<row>4</row><col>1</col>
|
||||||
<halign>right</halign>
|
<halign>right</halign>
|
||||||
<label>Parking:</label>
|
<label>Parking:</label>
|
||||||
<enable>
|
<enable>
|
||||||
|
@ -201,7 +215,7 @@
|
||||||
|
|
||||||
<combo>
|
<combo>
|
||||||
<name>parking</name>
|
<name>parking</name>
|
||||||
<row>3</row><col>2</col>
|
<row>4</row><col>2</col>
|
||||||
<pref-width>85</pref-width>
|
<pref-width>85</pref-width>
|
||||||
<enable>
|
<enable>
|
||||||
<property>/sim/gui/dialogs/location-on-ground/use_parkpos</property>
|
<property>/sim/gui/dialogs/location-on-ground/use_parkpos</property>
|
||||||
|
|
Loading…
Add table
Reference in a new issue