User Tools

Site Tools


dragengine:modules:dragonscript:xmlguitheme:parameters

This is an old revision of the document!


Parameters

Parameters define a value of a specific type to assign to a parameter by name. The last set values for a particular parameter name is used in the end. The supported types are described here. In general all attributes are optional unless marked otherwise. Not defined attributes use the default value.

Integer

Sets an integer value.

<integer parameter='ParameterName'>1234</integer>

Floating Point

Sets a floating point value. Supports regular and scientific notation (for example 1e2).

<float parameter='ParameterName'>12.34</float>

Boolean

Sets a boolean value. The values “true”, “yes” and “1” are considered true values. The values “false”, “no”, “0” are considered false values. All other values are considered false. It is recommended to use “true” and “false” with the other possible values to support conversion tools.

<boolean parameter='ParameterName'>true</boolean>

String

Sets a string value. This is typically used for parameters allowing the user to choose one or more flags from a set of named flags.

<string parameter='ParameterName'>center,middle</string>

Color

Sets a color value. Color values compose of a red, green, blue and alpha value. If an attribute is not used the default values are red=0, green=0, blue=0 and alpha=1. You can define the value using different notations. You can use any of the forms below but you can not mix them.

<!-- Define color using floating point values in the range from 0 to 1. All attributes are optional. -->
<color parameter='ParameterName' r='1' g='0.5' b='0.25' a='1'/>
 
<!-- Define color using a hex encoded value typically found in website design. Supported is the #RRGGBB and #RRGGBBAA form. -->
<color parameter='ParameterName' hex='ff8040'/>
 
<!-- Define color using integer values in the range from 0 to 255. All attributes are optional. -->
<color parameter='ParameterName' ir='255' ig='128' ib='64' ia='255'/>

Color Matrix

Sets a color matrix value. Color matrices are defines as a list of individual color matrices concatenated in the order they are defined. This allows to create various combinations. If the list is empty null is used as values instead.

<colorMatrix parameter='ParameterName'>
   <!--
   Define matrix shifting color components. Tag is of color typed as defined above but with 0 as default for alpha.
   -->
   <translate r='0' g='0.1' b='0'/>
 
   <!--
   Define matrix scaling color components. Tag is of color typed as defined above.
   -->
   <scale r='1' g='0.5' b='1' a='1'/>
 
   <!--
   Defines brightness matrix. Same as brightness in color programs.
   Tag is of color typed as defined above but with 0 as default for alpha.
   -->
   <brightness r='0' g='0.1' b='0'/>
 
   <!--
   Defines contrast matrix. Same as contrast in color programs.
   Tag is of color typed as defined above.
   -->
   <contrast r='1' g='0.7' b='1'/>
 
   <!--
   Defines saturation matrix. Values less than 1 desaturate. Values above 1 over-saturate.
   Tag is of color typed as defined above.
   -->
   <saturation r='0.5' g='2' b='0.5'/>
 
   <!-- Inverts color -->
   <invertColor/>
 
   <!--
   Define custom color matrix column wise in this order: red, green, blue, alpha, white.
   [red.r, green.r, blue.r, alpha.r, white.r]
   [red.g, green.g, blue.g, alpha.g, white.g]
   [red.b, green.b, blue.b, alpha.b, white.b]
   [red.a, green.a, blue.a, alpha.a, white.a]
 
   The example below defines an identity color matrix.
   -->
   <custom>
     <red r='1' g='0' b='0' a='0'/>
     <green r='0' g='1' b='0' a='0'/>
     <blue r='0' g='0' b='1' a='0'/>
     <alpha r='0' g='0' b='0' a='1'/>
     <white r='0' g='0' b='0' a='0'/>
   </custom>
</colorMatrix>

Font

Sets a font parameter. Fonts are engine resources. When you define a font parameter you select the font file to use and the line height in pixels. If the line height does not match the font scaling is required which might look ok or not.

<font parameter='ParameterName' size='15'>myfont.defont</font>
You could leave a comment if you were logged in.
dragengine/modules/dragonscript/xmlguitheme/parameters.1519739860.txt.gz · Last modified: 2018/02/27 13:57 by dragonlord