On Sat, 30 Jun 2001 jimw@... wrote:
> Actually I had tried all three syntaxes and none of them were working. It
> seems that for some reason it wouldn't bind to the "V" key. That seems
> weird. After trying to bind another command to "V" I realized this, and
> just changed the key. This works:
I think V may have already been bound.
> <key n="115">
> <desc>Swap panels.</desc>
> <desc>Load panel.</desc>
Yes, this would be a good addition but (he says without trying it first),
I think theres a way to write it without /sim/panel2/path. Something about
that just looks kludgy, but hey, As long as it works, right?
> It also works if you use the n="0", etc sytnax. Is there interest in putting
> this in the base package along with the default panel? Would a different key
> be better? I can post a tarball with all the necessary xml included.
> Not sure if this is a good canditate for a joystick button, but certainly
> if one wanted to they could bind the same to a button number.
Well, I'd vote for joystick because I have a fourth button not doing
anything. I think a kbd and a joystick button is the way to go, since
that covers all the bases.
> David Megginson <david@...> said:
> > John Check writes:
> > > The last paragraph and the example were added. Make sense?
> > >
> > > Bindings
> > > --------
> > > A command may have more than one binding. By default, the examples below
> > > use just /binding or <binding>, but /binding or <binding n="0"> is
> > > implied.
> > > When bindings are specified in XML the indices are created automagically.
> > > If
> > > you wish to avoid XML you must supply the index number for multiple
> > > bindings
> > > in your command line formatted options.
> > > Multiple properties in a single binding must have the index specified. For
> > > example if you build a switch that loads alternate panels the XML form
> > > must be written thusly:
> > >
> > > <command>property-swap</command>
> > > <property n="0">/sim/panel/path=foo</property>
> > > <property n="1">/sim/panel/path=bar</property>
> > Not quite. First, the '=' sign isn't allowed in a property name, and
> > second, as with the panel code (i.e. <instrument>), you can leave out
> > the indexes and have them generated automatically:
> > <binding>
> > <command>property-swap</command>
> > <property>/foo</property>
> > <property>/bar</property>
> > </binding>
> > This will swap the values of the /foo and /bar properties. I
> > understand now that the original poster wanted to do something
> > different -- cycle through two values for the same property, which is
> > not the intention of this command.
> > I'd like to make a new command to do that, and I think I can
> > generalize it to cycle through n values for the same property,
> > something like this:
> > <binding>
> > <command>property-cycle</command>
> > <property>/sim/fog</property>
> > <value>none</value>
> > <value>fastest</value>
> > <value>nicest</value>
> > </binding>
> > That might not be quite right, though. If the current value is none
> > of the above, how does the command know what to cycle to? Does it
> > always start over? Does it always go to what it thinks is the right
> > position?
> > This needs a bit of thought.
> > All the best,
> > David
> > --
> > David Megginson
> > david@...
> > _______________________________________________
> > Flightgear-devel mailing list
> > Flightgear-devel@...
> > http://lists.sourceforge.net/lists/listinfo/flightgear-devel
> Flightgear-devel mailing list