location-on-ground
vbox
var dlg = props.globals.getNode("/sim/gui/dialogs/location-on-ground", 1);
var apt = dlg.getNode("airport", 1);
apt.setValue("");
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)
};
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");
}
table
center
0
1
right
0
2
/sim/gui/dialogs/location-on-ground/airport
1
0
/sim/gui/dialogs/location-on-ground/use_runway
true
nasal
1
1
right
1
2
/sim/gui/dialogs/location-on-ground/runway
2
0
/sim/gui/dialogs/location-on-ground/use_parkpos
true
nasal
2
1
right
2
2
/sim/gui/dialogs/location-on-ground/parkpos
hbox
10
true
true
true