From dde2115a59776ccdad7afacc546861a350be4cb6 Mon Sep 17 00:00:00 2001 From: Gijs de Rooy Date: Tue, 3 Jan 2012 15:29:23 +0100 Subject: [PATCH] Pre-populate dialog with original airport, add best-runway option. --- gui/dialogs/location-on-ground.xml | 59 +++++++++++++++++++++++++----- 1 file changed, 49 insertions(+), 10 deletions(-) diff --git a/gui/dialogs/location-on-ground.xml b/gui/dialogs/location-on-ground.xml index 45c836314..6ef505ca0 100644 --- a/gui/dialogs/location-on-ground.xml +++ b/gui/dialogs/location-on-ground.xml @@ -32,15 +32,16 @@ var dlg = props.globals.getNode("/sim/gui/dialogs/location-on-ground", 1); var apt = dlg.getNode("airport", 1); - apt.setValue(""); + apt.setValue(getprop("/sim/presets/airport-id")); var rwy = dlg.getNode("runway", 1); rwy.setValue(""); var parkpos = dlg.getNode("parkpos", 1); parkpos.setValue(""); var mode = { - runway: dlg.getNode("use_runway", 1), - parkpos: dlg.getNode("use_parkpos", 1) + runway: dlg.getNode("use_runway", 1), + bestrunway: dlg.getNode("use_best_runway", 1), + parkpos: dlg.getNode("use_parkpos", 1) }; var set_radio = func(m) { @@ -78,6 +79,8 @@ gui.dialog_update("location-on-ground"); } + + updateRunways(); @@ -106,6 +109,33 @@ 10 + /sim/gui/dialogs/location-on-ground/use_best_runway + true + + nasal + + + + + + 11 + right + + + /sim/gui/dialogs/location-on-ground/use_best_runway + + + + 12 + right + + + /sim/gui/dialogs/location-on-ground/use_best_runway + + + + + 20 /sim/gui/dialogs/location-on-ground/use_runway true @@ -115,14 +145,17 @@ - 11 + 21 right + + /sim/gui/dialogs/location-on-ground/use_runway + - + runway - 12 + 22 85 /sim/gui/dialogs/location-on-ground/use_runway @@ -137,7 +170,7 @@ - 20 + 30 /sim/gui/dialogs/location-on-ground/use_parkpos true @@ -147,13 +180,16 @@ - 21 + 31 right + + /sim/gui/dialogs/location-on-ground/use_parkpos + - 22 + 32 /sim/gui/dialogs/location-on-ground/use_parkpos @@ -179,7 +215,10 @@ nasal