Bindings: Difference between revisions

Jump to navigation Jump to search
18 bytes added ,  30 November 2010
m
Robot: Cosmetic changes
(Created page with ''''Bindings''' define what happens when a user: * clicks an object in the scenery or an aircraft * press a key on the keyboard or […')
 
m (Robot: Cosmetic changes)
Line 1: Line 1:
'''Bindings''' define what happens when a user:
'''Bindings''' define what happens when a user:
* [[Howto:_Make_a_clickable_panel#Pick|clicks an object]] in the [[scenery]] or an [[aircraft]]
* [[Howto: Make a clickable panel#Pick|clicks an object]] in the [[scenery]] or an [[aircraft]]
* press a key on the keyboard or [[joystick]]
* press a key on the keyboard or [[joystick]]
* clicks a [[menu]] item
* clicks a [[menu]] item
Line 8: Line 8:
All give codes are examples, found on various places in the [[FlightGear]] package.
All give codes are examples, found on various places in the [[FlightGear]] package.


==Commands==
== Commands ==
===dialog-show===
=== dialog-show ===
Shows a dialog, which should be present in <tt>[[$FG_ROOT]]/gui/Dialogs</tt>.  
Shows a dialog, which should be present in <tt>[[$FG ROOT]]/gui/Dialogs</tt>.  
  <binding>
  <binding>
   <command>dialog-show</command>
   <command>dialog-show</command>
Line 17: Line 17:
* '''dialog-name:''' the name of the dialog, as designated in its .xml file.
* '''dialog-name:''' the name of the dialog, as designated in its .xml file.


===nasal===
=== nasal ===
[[Nasal]] is frequently used for complicated systems.
[[Nasal]] is frequently used for complicated systems.
  <binding>
  <binding>
Line 24: Line 24:
  </binding>
  </binding>


===property-adjust===
=== property-adjust ===
Increases or decreases a property's value with a given step. Maximum and minimum values are optional.
Increases or decreases a property's value with a given step. Maximum and minimum values are optional.
  <binding>
  <binding>
Line 34: Line 34:
  </binding>
  </binding>


===property-cycle===
=== property-cycle ===
Cycles between a list of values and assigns one to a property. The value-list can vary in length.
Cycles between a list of values and assigns one to a property. The value-list can vary in length.
  <binding>
  <binding>
Line 44: Line 44:
  </binding>
  </binding>


===property-randomize===
=== property-randomize ===
Assigns a random value (between min and max) to a property.
Assigns a random value (between min and max) to a property.
  <binding>
  <binding>
Line 53: Line 53:
  </binding>
  </binding>


===property-set===
=== property-set ===
One of the most important commands. It sets a property to a predefined value.
One of the most important commands. It sets a property to a predefined value.
  <binding>
  <binding>
Line 61: Line 61:
  </binding>
  </binding>


===property-swap===
=== property-swap ===
Swaps the values of two properties.
Swaps the values of two properties.
  <binding>
  <binding>
Line 69: Line 69:
  </binding>
  </binding>


===property-toggle===
=== property-toggle ===
Toggles the value of a property on each click, between true (1) and false (0).
Toggles the value of a property on each click, between true (1) and false (0).
  <binding>
  <binding>

Navigation menu