David Culp writes:

 > If I want to use a single key (or button) to toggle a property
 > between "0" and "-1", is there a way to do it without creating an
 > <else> tag?

Use the property-cycle command.  For example, to cycle /foo/bar
between -1 and 0 you could use this:

 <button n="5">
  <repeatable>false</repeatable>
  <binding>
   <command>property-cycle</command>
   <property>/foo/bar</property>
   <value>0</value>
   <value>-1</value>
  </binding>
 </button>

You can have as many values as you want.  If the current value of the
property does not appear in the list, the command causes it to
start over again.  Make sure you don't include any duplicate values in
the cycle.


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