It's probably not well known that livery files (or other "overlay"
files) have no defined structure. They are just XML files that are
copied ("laid") over the property tree on request. What you put in
there, and where, is entirely your business. It doesn't have to do
with liveries and textures at all. Take this example:

Overlay file (in $FG_ROOT/Airports/Places/):

  <?xml version="1.0"?>
  <PropertyList>
      <sim>
          <presets>
              <name>Vienna City</name>
              <latitude-deg>48.2402400</latitude-deg>
              <longitude-deg>16.4106300</longitude-deg>
          </presets>
      </sim>
  </PropertyList>


Nasal:

  gui.teleport_dialog = gui.OverlaySelector.new(
       "Teleport to",       # dialog title
       "Airports/Places",   # directory with overlay XML files
       "sim/presets/name",  # where the name is in those files
       nil,                 # no sorting property (-> sort by name)
       nil,                 # no MP property (-> no MP transmission)
       func fgcommand("presets-commit"));
                            # what to do if new entry was chosen

Binding:

  gui.teleport_dialog.open();


And if you now click entry "Vienna City", you'll immediately
get telported there. BTW: menu bindings should always use the
open() method, keys always the toggle() method.

m.

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to