Difference between revisions of "GUI Themes/Specs"

Jump to navigation Jump to search
No change in size ,  20:01, 4 August 2016
(→‎Syntax overview: Fix syntax highlighting)
Line 126: Line 126:
The resolution property must contain one or more resolution dimension limits, comma separated, for which the given key is supposed to be loaded. Resolutions without any modifiers will force the theme to be loaded in all resolutions. Here are a few examples:
The resolution property must contain one or more resolution dimension limits, comma separated, for which the given key is supposed to be loaded. Resolutions without any modifiers will force the theme to be loaded in all resolutions. Here are a few examples:


<syntax type="xml">
<source lang="xml">
/* Key will be loaded in all resolutions */
/* Key will be loaded in all resolutions */
<render_info>
<render_info>
Line 135: Line 135:
/* Key will ONLY be loaded in resolutions with less than 400 height */
/* Key will ONLY be loaded in resolutions with less than 400 height */
<render_info resolution = 'y<400'>
<render_info resolution = 'y<400'>
</syntax>
</source>


Note that the Theme Parser does not assert on repeated keys or values, it just replaces them accordingly. For instance, the following variable definition:
Note that the Theme Parser does not assert on repeated keys or values, it just replaces them accordingly. For instance, the following variable definition:


<syntax type="xml">
<source lang="xml">
<def var = 'TestVar' value = '100'/>
<def var = 'TestVar' value = '100'/>
<def var = 'TestVar' value = '200' resolution = 'y>399'/>
<def var = 'TestVar' value = '200' resolution = 'y>399'/>
</syntax>
</source>


won't fail to parse. What will happen when loading the theme using a resolution with 400 height or mire is that <tt>TestVal</tt> first will be assigned the <tt>100</tt> value, and then it will be overwritten with the <tt>200</tt> value. On the other hand, when loading the theme using a resolution ''with less'' than 400 height, the <tt>ThemeVal</tt> will be assigned the <tt>100</tt> value and the second key will be plain ignored.
won't fail to parse. What will happen when loading the theme using a resolution with 400 height or mire is that <tt>TestVal</tt> first will be assigned the <tt>100</tt> value, and then it will be overwritten with the <tt>200</tt> value. On the other hand, when loading the theme using a resolution ''with less'' than 400 height, the <tt>ThemeVal</tt> will be assigned the <tt>100</tt> value and the second key will be plain ignored.
TrustedUser
2,147

edits

Navigation menu