Norman Vine writes:

 > We really need a dictionary of the 'known' property 'nouns',
 > 'verbs', 'adjectives' and 'adverbs' and *require* that this list is
 > updated before a new 'word' is introduced into the XML.

That would be nice, but it would require a committed project manager
willing and able to enforce it; if that manager were not extremely
energetic, program development would soon start to drag down and stop.
I know of no open-source project that is able to enforce this kind of
discipline; in fact, I know of no commercial project that actually
succeeded in doing so, though I suspect that some defense and
aerospace projects manage.  I agree that documentation is a good
thing, but it's necessary to accept that it will always lag a little.

Right now, I've documented all of the built-in commands inside
src/Main/fg_commands.cxx, but that's not all that useful for
non-programmers.  Here's a quick list for the documentation people, if
anyone wants to beautify it (some of these are obviously deadwood and
should be purged as soon as possible):


Command: null
Description: do nothing

Command: exit
Description: exit FlightGear

Command: load
Description: load a saved flight
Parameters:
  file (optional): the name of the file to load, relative to the
  current directory (defaults to "fgfs.sav").

Command: save
Description: save a flight
Parameters:
  file (optional): the name of the file to save, relative to the
  current directory (defaults to "fgfs.sav").

Command: panel-load
Description: (re)load the 2D panel
Parameters:
  path (optional): the file name to load the panel from, relative to
    FG_ROOT.  Defaults to the value of /sim/panel/path, and if that's
    unspecified, then to the relative path "Panels/Default/default.xml".

Command: panel-mouse-click
Description: pass a mouse click to the 2D panel
Parameters:
  button: the mouse button number, zero-based
  is-down: true if the button is down, false if it is up
  x-pos: the x position of the mouse click
  y-pos: the y position of the mouse click

Command: preferences-load
Description: (re)load preferences
Parameters:
  path (optional): the file name to load the panel from, relative to
    FG_ROOT (defaults to "preferences.xml").

Command: view-cycle
Description: cycle the view

Command: screen-capture
Description: capture a screenshot

Command: tile-cache-reload
Description: reload the scenery tile cache

Command: lighting-update
Description: force the lighting to be updated

Command: property-toggle
Description: toggle a boolean property value between true and false
Parameters:
  property: the name of the property to toggle; it will be created if
    it does not exist.

Command: property-assign
Description: assign a value to a property
Parameters:
  property[0]: the name of the property to assign; it will be created
    if it does not exist.
  value: the value to assign to the property; *or*
  property[1]: the existing property to copy the value from.

Command: property-adjust
Description: increment or decrement a property value
Parameters:
  property: the name of the property to adjust; it will be created if
    it does not exist.
  step: the amount of the increment or decrement (defaults to 0); *or*
  offset: offset (used for mouse movement, multiplied by factor)
  factor: scaling amount for the offset (defaults to 1)
  min (optional): the minimum allowed value (default is no minimum)
  max (optional): the maximum allowed value (default is no maximum)
  mask (optional): 'integer' to apply only to the left of the decimal
    point, 'decimal' to apply only to the right of the decimal place,
    or 'all' to apply to the full number (default is 'all')
  wrap: true if the value should be wrapped when it passes min or max,
    false if it should be clamped

Command: property-multiply
Description: multiply a property value
Parameters:
  property: the name of the property to multiply; it will be created if
    it does not exist.
  factor: amount by which to multiply (defaults to 1)
  min (optional): the minimum allowed value (default is no minimum)
  max (optional): the maximum allowed value (default is no maximum)
  mask (optional): 'integer' to apply only to the left of the decimal
    point, 'decimal' to apply only to the right of the decimal place,
    or 'all' to apply to the full number (default is 'all')
  wrap: true if the value should be wrapped when it passes min or max,
    false if it should be clamped

Command: property-swap
Description: swap the values of two properties
Parameters:
  property[0]: the name of the first property in the swap; it will be
    created if it does not exist
  property[1]: the name of the second property in the swap; it will be
    created if it does not exist

Command: property-scale
Description: set a property based on an axis or other moving input
Parameters:
  property: the name of the property to scale; it will be created if
    it does not exist.
  setting: the current input device setting, usually between -1 and 1.
  offset: the offset to shift by before applying the factor.
  factor: the factor to multiply by (use negative to reverse)

Command: dialog-show
Description: show an XML-configured dialog box
Parameters:
  dialog-name: the name of the GUI dialog to display

Command: dialog-close
Description: hide the currently-active XML-configured dialog box

Command: dialog-update
Description: update a value in the active XML-configured dialog box
    (copy from the property to the dialog field)
Parameters:
  object-name (optional): the name of the GUI object(s) to update
    (defaults to all objects in the dialog)

Command: dialog-apply
Description: apply a value in the active XML-configured dialog box
    (copy from the dialog field to the property)
Parameters:
  object-name (optional): the name of the GUI object(s) to apply
    (defaults to all objects in the dialog)

Command: presets-commit
Description: commit all presets (from /sim/presets)


All the best,


David

-- 
David Megginson, [EMAIL PROTECTED], http://www.megginson.com/

_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to