var

 

Tag: var
Parent tag: window
Attributes:

  • label: the label to be displayed
  • type: the object type
  • context: the object name or CURRENT when the object is RENDERER
  • component: the component of the object
  • def (string, optional): a string that allows the specification of maximum and minimum values.
  • id: the index of the object (useful for textures for instance)
  • mode (enum, optional): {COLOR, DIRECTION}
  • script (string, optional): name of lua script to be executed when the value is changed
  • scriptFile (string, optional): file where the lua script is located
  • strings (string, optional): string with options separated by commas. This acts as an enumerator, i.e., the first string will return 0, the second 1, and so on … Can be used with INT data types to provide a more readable interface.

Adds a variable to the window. See here for a full list of available type and component items.

Example:

	
<interface>
        <window label = "Render Mode">
            <var label="Light Color" type="LIGHT" context="Sun" component="COLOR" mode="COLOR"/>
            <var label="Light Dir" type="LIGHT" context="Sun" component="DIRECTION" mode="DIRECTION"/>
            <var label="Spot Exponent" type="LIGHT" context="Sun" component="SPOT_EXPONENT" def="min=0.0 max=1024.0"/>
            <var label="mode" type="RENDERER" context="CURRENT" component="mode" strings="Blinn-Phong,Ivory" />
        </window>
</interface>