tutorial vbox 4 tutorial.stopTutorial(); var list = cmdarg().getNode("group[1]/group/list"); var node = props.globals.getNode("/sim/tutorials", 1); var tut = node.getChildren("tutorial"); var current = node.getNode("current-tutorial", 1); # fill listbox list.removeChildren("value"); forindex (var i; tut) { var name = tut[i].getNode("name"); if (name == nil) { die("tutorial #" ~ i ~ " has no <name>"); } name = name.getValue(); list.getChild("value", i, 1).setValue(name); } select = func { var name = current.getValue(); foreach (var t; tut) { if (t.getNode("name").getValue() == name) { setprop("/sim/tutorials/current-description", screen.trim(t.getNode("description").getValue())); break; } } fgcommand("dialog-update", props.Node.new({"object-name": "textbox", "dialog-name": "tutorial"})); } if (current.getType() == "NONE" or current.getValue() == "") { current.setValue(tut[0].getNode("name").getValue()); select(); } hbox 0 7 left /sim/tutorials/current-tutorial 1 true hbox textbox fill 600 480 20 true false 1 /sim/tutorials/current-description vbox list fill 170 400 /sim/tutorials/current-tutorial dialog-apply list nasal true