callsign vbox 30 60 160 var loopid = 0; var list = cmdarg().getNode("list"); var search = func(list, item) { var left = 0; var right = size(list); while (left < right) { var middle = int((left + right) / 2); var c = cmp(list[middle].getNode("callsign").getValue(), item); if (!c) return middle; if (c > 0) right = middle; else left = middle + 1; } return -1; } var select = func(which) { var index = search(cam.aircraft_list, which); if (index >= 0) cam.select_aircraft(index); } var loop = func(id) { id == loopid or return; cam.update_aircraft_list(); list.removeChildren("value"); forindex (var i; cam.aircraft_list) { var name = cam.aircraft_list[i].getNode("callsign").getValue(); list.getChild("value", i, 1).setValue(name); } gui.dialog_update("callsign", "list"); settimer(func { loop(id) }, 5); } loop(loopid); loopid += 1; hbox 1 1 list fill 300 /sim/gui/dialogs/cam/select dialog-apply nasal