Overlay selector. Displays a list of overlay XML files and copies the
chosen one to the property tree. The class allows to select liveries,
insignia, decals, variants, etc. Usually the overlay properties are
fed to "select" and "material" animations.
SYNOPSIS:
OverlaySelector.new(<title>, <dir>, <nameprop> [, <sortprop> [, <mpprop> [, <callback>]]]);
title ... dialog title
dir ... directory where to find the XML overlay files,
relative to FG_ROOT
nameprop ... property in an overlay file that contains the name
The result is written to this place in the
property tree.
sortprop ... property in an overlay file that should be used
as sorting criterion, if alphabetic sorting by
name is undesirable. Use nil if you don't need
this, but want to set a callback function.
mpprop ... property path of MP node where the file name should
be written to
callback ... function that's called after a new entry was chosen,
with these arguments:
callback(<number>, <name>, <sort-criterion>, <file>, <path>)
EXAMPLE:
aircraft.data.add("sim/model/pilot"); # autosave the pilot
var pilots_dialog = gui.OverlaySelector.new("Pilots",
"Aircraft/foo/Models/Pilots",
"sim/model/pilot");
pilots_dialog.open(); # or ... close(), or toggle()