location-in-air vbox left p = props.globals.getNode("/sim/gui/dialogs/location-in-air/", 1); mode = { airport: p.getNode("airport", 1), lonlat: p.getNode("lonlat", 1), vor: p.getNode("vor", 1), ndb: p.getNode("ndb", 1), fix: p.getNode("fix", 1), }; set_radio = func(m) { foreach (k; keys(mode)) { mode[k].setBoolValue(m == k); } } initialized = 0; foreach (k; keys(mode)) { if (mode[k].getType() == "NONE") { mode[k].setBoolValue(0); } initialized += mode[k].getBoolValue(); } if (!initialized) { set_radio("airport"); } # just kept for educational purposes :-) table left 00 true /sim/gui/dialogs/location-in-air/airport dialog-apply nasal 01 02 /sim/presets/airport-id 03 04 /sim/presets/runway 10 true /sim/gui/dialogs/location-in-air/lonlat dialog-apply nasal 11 12 /sim/presets/longitude-deg 13 14 /sim/presets/latitude-deg 20 true /sim/gui/dialogs/location-in-air/vor dialog-apply nasal 21 right 22 /sim/presets/vor-id 30 true left /sim/gui/dialogs/location-in-air/ndb dialog-apply nasal 31 right 32 /sim/presets/ndb-id 40 true /sim/gui/dialogs/location-in-air/fix left dialog-apply nasal 41 right 42 /sim/presets/fix table 00 right 01 /sim/presets/offset-distance-nm 02 right 03 /sim/presets/offset-azimuth-deg 10 right 11 /sim/presets/altitude-ft 12 right 13 /sim/presets/glidescope-deg 20 right 21 /sim/presets/airspeed-kt 22 right 23 /sim/presets/heading-deg hbox 10